# Vextorium Regex Test API

> Vextorium Regex Test API is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Tests a regular expression against text, returning all matches with positions, capture groups, named groups, and optional substitution result

## Facts

- Endpoint: POST https://api.vextorium.com/v1/regex-test?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-regex-test-api-c79901d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ib4hnxNm27p6MnCotAd2T

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 vextorium-regex-test-api-c79901d8 -d '<json body>'
```

Example prompt: Test the regex pattern (?P<user>\w+)@(?P<dom>[\w.]+) against the text 'contact ana@x.com or luis@y.org for info' and show me all matches with their named groups and positions.

## When to prefer this

Choose this endpoint when you need server-side regex execution with guaranteed safety against ReDoS (catastrophic backtracking), especially when running untrusted or complex patterns. It is preferable over client-side regex when you need structured output (positions, named groups, substitution result) in a single API call, or when the agent environment does not support native regex execution.

## Known failure modes

- Pattern causes catastrophic backtracking — endpoint enforces a time limit and returns a timeout/error
- Invalid regex syntax in pattern field — returns an error describing the syntax problem
- Missing required fields (pattern or text) — returns a validation error
- Unsupported flag character supplied — returns an error listing valid flags (i, m, s, x)
- Empty text or pattern — may return matches:false with num_matches:0

## How this service works

232 pay-per-call data APIs for AI agents: official statistics and economy (ECB, Fed, Eurostat, World Bank, SEC, BOE, INE), crypto prices and sentiment, Spanish public data, compliance (sanctions, VAT, IBAN, LEI), science, weather, web and developer tools and local AI text tools. Pay in USDC via x402.

## Output

A JSON object containing: whether any matches were found (matches bool), total match count (num_matches), list of match objects each with start/end character positions, matched text, ordered capture groups array, named capture groups object, plus the group_names list and substitution_result string if a replacement was provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  },
  "flags": {
   "type": "string"
  },
  "pattern": {
   "type": "string"
  },
  "max_matches": {
   "type": "integer"
  },
  "replacement": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flags": null,
  "matches": [
   {
    "end": 9,
    "text": "ana@x.com",
    "start": 0,
    "groups": [
     "ana",
     "x.com"
    ],
    "named_groups": {
     "dom": "x.com",
     "user": "ana"
    }
   },
   {
    "end": 22,
    "text": "luis@y.org",
    "start": 12,
    "groups": [
     "luis",
     "y.org"
    ],
    "named_groups": {
     "dom": "y.org",
     "user": "luis"
    }
   }
  ],
  "pattern": "(?P<user>\\w+)@(?P<dom>[\\w.]+)",
  "is_match": true,
  "group_names": [
   "user",
   "dom"
  ],
  "num_matches": 2,
  "defined_groups": 2,
  "substitution_result": null
 }
}
```

## More

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