# AgentsToolsHub Regex Tester

> AgentsToolsHub Regex Tester is a paid API for AI agents from agentstoolshub.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-17).

Tests a regular expression against text and returns every match with its substring, character index, and all capture groups.

## Facts

- Endpoint: GET https://agentstoolshub.com/api/v1/dev/regex-tester?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentstoolshub-regex-tester-4831d5cf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-ArQqsiWYpGjK7Cvn0xFf

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 agentstoolshub-regex-tester-4831d5cf
```

Example prompt: Run the regex pattern (\d{4}-\d{2}-\d{2}) with the global flag against this text: 'Meeting on 2024-03-15 and follow-up on 2024-04-01' — show me every match, its position, and capture groups.

## When to prefer this

Choose this endpoint when you need deterministic, exhaustive regex matching with full capture group and index data — especially when LLM-simulated regex matching would be unreliable. Ideal for agents that need to extract structured data from text (emails, dates, version numbers, phone numbers) with exact character positions. Prefer this over general-purpose text extraction when the pattern is known and precision is required.

## Known failure modes

- Invalid regex pattern returns an error indicating malformed syntax
- Missing required 'pattern' or 'text' query parameters returns a 400 error
- Regex with catastrophic backtracking may time out on large inputs
- Empty text string returns an empty matches array
- Unsupported regex flags may be rejected or silently ignored

## How this service works

Test a regular expression against text and see every match: the matched substring, its index, and all capture groups. Deterministic — the same pattern and text always produce the same result, unlike LLM-simulated regex matching. Use this when an agent needs to pattern + text → every match, group and index.

## Output

Returns an array of match objects, each containing the full matched substring, the character index of the match within the input text, and an array of all capture group values (in group order). The same pattern and text always produce identical results.

## 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": "Text to test"
      },
      "flags": {
       "type": "string",
       "description": "Flags"
      },
      "pattern": {
       "type": "string",
       "description": "Pattern"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

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