# Regex Test

> Regex Test is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Runs a JavaScript regular expression against input text and returns all matches, capture groups, named groups, match count, and timing safety guard

## Facts

- Endpoint: GET https://intel.rallylive.ca/dev/regex-test
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/regex-test-ff46de29
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__i8C6Em13kT9L0ocMLFUQ

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-test-ff46de29
```

Example prompt: Test the regex /([\w.]+)@([\w.]+\.\w+)/gi against this text: 'Contact us at hello@example.com or support@acme.org for help.' and show me all the matches with their capture groups.

## When to prefer this

Use this endpoint when you need server-side JavaScript regex execution with reliable timeout protection against ReDoS patterns, capture group extraction, named group support, and a structured match-by-match breakdown — especially when you cannot safely run regex in a client environment or need an auditable per-call record of regex results without storing the tested text.

## Known failure modes

- Invalid regex syntax returns an error response
- Catastrophically backtracking patterns are killed after 2-second timeout
- Missing required input parameters returns a validation error
- Regex with no matches returns an empty matches array with count 0

## How this service works

Regex tester: runs a JavaScript regular expression (pattern or /pattern/flags) against your text with the global flag, returning every match with index, the capture groups and named groups, the match count, and a 2-second timeout guard against catastrophic patterns. Text is not stored. $0.01 per test.

## Output

Returns an array of all matches found using the global flag, each with the matched string, its character index in the input, any positional capture groups, and any named capture groups. Also returns the total match count. A 2-second timeout guard prevents catastrophic backtracking from hanging the request.

## 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",
     "properties": {}
    }
   },
   "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/regex-test-ff46de29/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
