# regex-extract

> regex-extract 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 over input text and returns all matches, capture groups, match positions, total count, and any pattern error.

## Facts

- Endpoint: GET https://intel.rallylive.ca/data/regex
- 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-extract-2613d5fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xHZlQNCKth3pMbUSl3AUj

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-extract-2613d5fb
```

Example prompt: Can you run the regex /(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b)/gi over this text and give me all the email addresses it finds with their positions: 'Contact us at support@example.com or sales@company.org for help'?

## When to prefer this

Choose this endpoint when you need to run a JavaScript-compatible regular expression against text and get back structured match data including capture groups and character positions. It is ideal when your agent needs to extract structured tokens (emails, dates, IPs, codes) from unstructured text, or when you need to verify whether a pattern matches and how many times. Prefer this over general NLP extraction when you know the exact pattern to match.

## Known failure modes

- Invalid or malformed regex pattern returns an error message instead of matches
- No matches found returns an empty matches array with count zero
- Missing required input parameter causes a request error
- Catastrophic backtracking on complex patterns may cause slow or timed-out responses
- Special characters in the pattern not properly escaped may produce unexpected results

## How this service works

Regex extractor: runs a JavaScript regular expression over text and returns all matches with capture groups and positions, the match count, and an error message if the pattern is invalid. $0.01 per call.

## Output

Returns a list of all matches found in the text, each with the full match string, any capture group values, and the start/end character positions. Also includes the total count of matches and, if the regex pattern is syntactically invalid, an error message describing the problem.

## 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-extract-2613d5fb/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)
