{
  "x402Version": 2,
  "id": 5908,
  "slug": "5908",
  "resource": "https://402utils.com/v1/regex-test",
  "description": "Test a regex against one or many inputs, safely. Send {pattern, flags?, input|inputs[], mode?}: 'match' returns the first match + capture groups, 'matchAll' every match, 'replace' the rewritten string (needs {replacement}). A mandatory ReDoS guard statically rejects catastrophic patterns (nested quantifiers, `.*.*$`, backrefs) BEFORE running — on Workers no timeout can stop a runaway regex. For agents that generate and dry-run regexes.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "1000",
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "input": "date: 2026-07-06",
            "mode": "match",
            "pattern": "(\\d{4})-(\\d{2})-(\\d{2})"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "mode": "match",
            "results": [
              {
                "groups": [
                  "2026",
                  "07",
                  "06"
                ],
                "index": 6,
                "match": "2026-07-06",
                "matched": true
              }
            ]
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "flags": {
                    "description": "Any of gimsuyd (g added automatically for matchAll).",
                    "type": "string"
                  },
                  "input": {
                    "description": "A single input string (≤ 10000 chars).",
                    "type": "string"
                  },
                  "inputs": {
                    "description": "Multiple input strings.",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "mode": {
                    "default": "match",
                    "description": "match | matchAll | replace.",
                    "enum": [
                      "match",
                      "matchAll",
                      "replace"
                    ],
                    "type": "string"
                  },
                  "pattern": {
                    "description": "The regular expression source (no delimiters).",
                    "type": "string"
                  },
                  "replacement": {
                    "description": "Replacement string (with $1, $<name>) — required for mode 'replace'.",
                    "type": "string"
                  }
                },
                "required": [
                  "pattern"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "additionalProperties": false,
                "properties": {
                  "mode": {
                    "enum": [
                      "match",
                      "matchAll",
                      "replace"
                    ],
                    "type": "string"
                  },
                  "results": {
                    "description": "One entry per input (in order). Shape depends on mode.",
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "mode",
                  "results"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "402utils.com",
  "lastUpdated": "2026-08-24T00:46:14.245Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-08-24T00:46:14.114Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "402utils.com",
    "manifest_name": "402utils.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}