# Delx Regex Test

> Delx Regex Test is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Tests a regular expression against input text and returns all matches, capture groups, and match counts.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/regex
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-regex-test-53ca208d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6pFKp3kWVyeAtD8eO4jdV

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 delx-regex-test-53ca208d -d '<json body>'
```

Example prompt: Test the regex pattern ^(\d{4})-(\d{2})-(\d{2})$ against the string '2024-07-15' and show me all matches and capture groups.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-use regex testing and extraction service without setting up a local runtime or language environment. It's ideal for agents that need to validate or extract data using regex patterns on the fly, especially in workflows where spinning up code execution infrastructure is impractical. At $0.001 USDC per call it is cost-effective for occasional or automated use.

## Known failure modes

- Invalid or malformed regex pattern returns an error indicating the syntax issue
- Missing required fields (pattern or input text) result in a validation error
- Catastrophic backtracking patterns may time out
- Unsupported regex flags or syntax variants may cause errors
- Payment failure prevents endpoint from responding

## How this service works

Test a regular expression and return matches, groups, and counts for $0.001 USDC. Call when you need this bounded result without an API key or subscription. Returns machine-readable JSON via x402 on Base or Solana. Limitation: results cover only the supplied input or one bounded public endpoint at request time; callers must verify before acting.

## Output

Returns a structured result containing: all matched substrings, their positions/indices in the input, any named or numbered capture groups, and the total match count. If the pattern matches nothing, returns an empty match list with a count of zero.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

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