# HTTPay Regex Test — Pattern Matching via x402

> HTTPay Regex Test — Pattern Matching via x402 is a paid API for AI agents from httpay.xyz, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Tests a regex pattern against a text string and returns all matches, capture groups, and match indices using Node.js RegExp

## Facts

- Endpoint: POST https://httpay.xyz/api/regex-test
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/httpay-regex-test-pattern-matching-via-x402-a43a1aeb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_J0Neqe5-H1Bv2cJPdU0go

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 httpay-regex-test-pattern-matching-via-x402-a43a1aeb -d '<json body>'
```

Example prompt: Test the regex pattern ^\d{3}-\d{2}-\d{4}$ against the text '123-45-6789' with no flags and show me all matches and capture groups.

## When to prefer this

Use this endpoint when you need server-side regex execution with full Node.js RegExp semantics, capture group extraction, and match index data — especially useful when you want to validate or debug a regex without spinning up a local runtime, or when building an automated workflow that needs pattern matching as a pay-per-call step without API key management.

## Known failure modes

- Invalid regex pattern syntax — returns error indicating malformed pattern
- Missing required fields (pattern or text) — returns 400-style error
- Payment not attached or insufficient USDC balance — x402 payment required error
- Catastrophic backtracking on complex patterns may cause timeout

## How this service works

307 pay-per-call APIs (287 native + Universal Gateway proxying 37 services) powered by x402 and USDC on Base. Token intelligence, DeFi yields, MEV risk, AI tools, web scraping. No API keys, no subscriptions — pay $0.001–$0.05 per call.

## Output

Returns a JSON object containing all regex matches found in the text, any capture groups within those matches, and the start/end indices of each match — powered by Node.js built-in RegExp execution.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "Test a regex pattern against text. POST JSON: {pattern, text, flags}. Returns all matches, capture groups, and match indices. Uses Node.js built-in RegExp."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/httpay-regex-test-pattern-matching-via-x402-a43a1aeb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
