Agent Service · x402

Test a regex against one or many inputs, safely

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…

by 402utils.com · discovered, not yet claimed by its owner · updated 2026-08-24

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

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.

Tags: bazaar

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/5908.json for the price and payment options.
  3. Pay. Call GET https://402utils.com/v1/regex-test. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.001 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base
Uptime
0 of the last 1 checks answered
Calls (30d)
1 · 1 unique payers (third-party data from the public x402 Bazaar)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.0010xc55A2D530b53CBaD1001e4AfD4720B7E71f9C29160s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "amountUsd": 0.001,
    "maxTimeoutSeconds": 60
  }
]

Schemas

Output schema (JSON Schema)
{
  "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"
    }
  }
}
Example shape — generated from the schema, not a captured live response
null

Examples

curl
curl "https://402utils.com/v1/regex-test"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://402utils.com/v1/regex-test");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://402utils.com/v1/regex-test")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
402utils.com
Endpoint
https://402utils.com/v1/regex-test
Machine-readable
/resources/5908.json