# Regex Explainer with Token Breakdown

> Regex Explainer with Token Breakdown is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-10-10).

Explains a regular expression in plain English with a token-by-token breakdown, and optionally tests it against sample strings.

## Facts

- Endpoint: GET https://api.strale.io/x402/regex-explain?utm_source=zero.xyz
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-c27fbf7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b9mPPDyeatf5K7gsUZCdv

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-strale-io-c27fbf7e
```

Example prompt: Can you explain what this regex does, token by token: ^(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$ — and test it against these strings: 'Password1', 'hello', 'Abcdefg2'?

## When to prefer this

Use this endpoint when a user needs to understand what a regular expression does without reading raw syntax, or when debugging whether a regex matches specific strings. Ideal for developers learning regex, code reviewers, or AI agents that need to verify regex logic before applying it.

## Known failure modes

- Missing required 'regex' query parameter returns an error
- Malformed or invalid regex syntax may return a parse error
- Empty regex string may return a validation error
- test_strings array with unsupported types may be rejected

## How this service works

Explain a regular expression in plain English with token-by-token breakdown. Optionally test against sample strings.

## Output

A plain-English explanation of the regular expression with a detailed token-by-token breakdown describing what each part of the pattern matches, plus optional test results showing which sample strings match or fail the regex.

## Example request

```json
{
 "regex": "^[a-z]+@[a-z]+\\.[a-z]{2,}$",
 "test_strings": [
  "user@example.com",
  "invalid.email",
  "test@domain.co.uk"
 ]
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "regex"
     ],
     "properties": {
      "regex": {
       "type": "string"
      },
      "test_strings": {
       "type": "array"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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