# Regex Test — Match Pattern Against String

> Regex Test — Match Pattern Against String is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Tests a string against a regular expression pattern and returns matches, with optional flags

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/regex-test
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/regex-test-match-pattern-against-string-29044622
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3vcW-xBLCSGve2hE94xJv

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-match-pattern-against-string-29044622 -d '<json body>'
```

Example prompt: Test the text "Order #12345 placed on 2024-03-15" against the regex pattern \d{4}-\d{2}-\d{2} with the global flag and tell me all the matches.

## When to prefer this

Choose this endpoint when you need a quick, stateless regex match or extraction against a single string without setting up a local runtime. It's ideal for agents that need to validate or extract structured fragments (dates, IDs, URLs) from text on the fly, especially in serverless or sandboxed environments where running native regex code is inconvenient.

## Known failure modes

- Invalid regex pattern syntax returns an error response
- Missing required 'text' or 'pattern' fields causes a 400-level error
- Extremely long input strings may time out or be rejected
- Invalid flag characters may cause a parsing error
- Payment failure (non-payment of $0.01 USDC) results in a 402 response

## How this service works

Test a string against a regular expression and return matches

## Output

Returns whether the pattern matched, along with the matched substrings, their positions in the original text, and any capture group contents. Results reflect the behaviour of the supplied flags (e.g. global, case-insensitive, multiline).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "string"
  },
  "flags": {
   "type": "string",
   "description": "string (optional)"
  },
  "pattern": {
   "type": "string",
   "description": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/regex-test-match-pattern-against-string-29044622/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
