# Regex Tester & Pattern Matcher

> Regex Tester & Pattern Matcher is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-13).

Tests a regular expression pattern against input text and returns all matches, capture groups, and match indices

## Facts

- Endpoint: GET https://api.x402node.dev/dev/regex-test
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-01395c17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S7VWLYQgvuf371JSsCOCL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-x402node-dev-01395c17
```

Example prompt: Test the regex pattern `(\d{4}-\d{2}-\d{2})` against this text: 'Order placed on 2024-03-15, shipped on 2024-03-18' — show me all matches and capture groups.

## When to prefer this

Use this endpoint when you need to test, debug, or apply a regular expression to extract structured data from unstructured text — especially when you need capture group details and match indices. Prefer it over string search endpoints when pattern complexity requires regex semantics, or when you need all matches with positional metadata rather than a simple true/false.

## Known failure modes

- Invalid regex syntax causes a 400-level error with a description of the parse failure
- Empty pattern or text fields may return no matches or an error
- Catastrophic backtracking on complex patterns may cause a timeout
- Unsupported regex flags may be ignored or cause an error

## How this service works

regex test, test regex, regex tester, test regular expression, regex test online, regex pattern test, regular expression test, pattern matcher, JavaScript regex test, find regex matches, regex validator, regex debugger, regex 101 alternative. Test any regex pattern against text. Returns all matches with capture groups and indices. For AI agents, pattern extraction, text validation, log parsing. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object with: the original pattern, a boolean indicating whether any match was found, an array of all matches (including capture groups and their indices), the flags used, and the total match count.

## Example request

```json
{
 "text": "Order placed on 2024-03-15, shipped on 2024-03-18",
 "flags": "g",
 "pattern": "(\\d{4}-\\d{2}-\\d{2})"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pattern",
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Input text (required)"
      },
      "flags": {
       "type": "string",
       "description": "Flags (optional)"
      },
      "pattern": {
       "type": "string",
       "description": "Pattern (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-01395c17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
