# agent402.tools Regex Tester

> agent402.tools Regex Tester is a paid API for AI agents from agent402.tools, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Tests a regular expression pattern against input text, returning match results plus text statistics in a single bundled workflow call.

## Facts

- Endpoint: POST https://agent402.tools/api/skill/regex-test
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-regex-tester-cc4a0db9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7n2LdAbnmq8PrpZYuV3ug

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 agent402-tools-regex-tester-cc4a0db9 -d '<json body>'
```

Example prompt: Test this regex pattern \b\w+@\w+\.\w+\b against the text 'Contact us at hello@example.com or support@test.org for help' and show me all matches and text stats.

## When to prefer this

Choose this endpoint when you need to rapidly validate or debug a regex pattern against real text during pattern development, especially when you want match results and text statistics together in one payment. Ideal for iterative regex authoring loops where each test needs quick turnaround.

## Known failure modes

- Invalid regex syntax returns an error describing the parse failure
- Empty pattern or text fields may return an error or trivial results
- Extremely long text may be truncated or rejected
- Catastrophic backtracking patterns could time out
- Non-string inputs will cause schema validation errors

## How this service works

Bundled execution of the Regex tester workflow — Test a regular expression against text and get match results plus text statistics — the quick validation loop for pattern development. One x402 payment runs 3 underlying tools (regex, text-stats, ex...

## Output

Returns match results showing which parts of the input text matched the regex pattern, along with text statistics (character count, word count, etc.) and any example matches — bundled from 3 underlying tools (regex, text-stats, examples) in one call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to match against"
  },
  "pattern": {
   "type": "string",
   "description": "Regex pattern to test (e.g. \\b\\w+@\\w+\\.\\w+\\b)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "text": "Contact us at hello@example.com or support@test.org",
   "pattern": "\\b\\w+@\\w+\\.\\w+\\b"
  },
  "pack": "regex-test",
  "steps": [
   {
    "ok": true,
    "slug": "regex",
    "result": {}
   },
   {
    "ok": true,
    "slug": "text-stats",
    "result": {}
   },
   {
    "ok": true,
    "slug": "extract-entities",
    "result": {}
   }
  ],
  "summary": "3/3 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-regex-tester-cc4a0db9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
