# Regex Tester API

> Regex Tester API is a paid API for AI agents from regex-generator.api.klymax402.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Tests a regular expression pattern against one or more input strings and returns match results

## Facts

- Endpoint: GET https://regex-generator.api.klymax402.com/api/test
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/regex-tester-api-3682d654
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_podVFSKpshOZAFsWNfOn8

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 regex-tester-api-3682d654
```

Example prompt: Test the regex pattern `^[\w.-]+@[\w.-]+\.\w{2,}$` with the global and case-insensitive flags against these strings: 'user@example.com', 'not-an-email', 'admin@site.org', and 'bad@' — tell me which ones match.

## When to prefer this

Use this endpoint when you need a quick, server-side regex test against multiple strings without running code locally — ideal for agents validating user input formats, debugging regex patterns, or checking whether a list of strings conforms to a pattern rule.

## Known failure modes

- Invalid regex pattern syntax returns an error
- Missing required 'pattern' or 'testStrings' fields causes a 400-level error
- Unsupported flag characters may be rejected
- Empty testStrings array may return empty results without error
- Very complex or catastrophically backtracking patterns may time out

## How this service works

Test a regex pattern against input strings

## Output

Returns which of the provided test strings match the given regex pattern, along with any captured groups or match details, evaluated under the specified flags (g, i, m, s, u).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "flags": {
   "type": "string",
   "description": "Regex flags: g, i, m, s, u (default: g)"
  },
  "pattern": {
   "type": "string",
   "description": "Regular expression pattern (without delimiters)"
  },
  "testStrings": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Array of strings to test against the pattern"
  }
 }
}
```

## More

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