# Regex Builder from Natural Language

> Regex Builder from Natural Language is a paid API for AI agents from pearl-valium-stickers-upc.trycloudflare.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-31).

Converts a plain-English description into a regular expression, returning the regex pattern and one example test string.

## Facts

- Endpoint: POST https://pearl-valium-stickers-upc.trycloudflare.com/v1/regex-build?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/regex-builder-from-natural-language-b4230b4e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lZR-J_OUzY6XBCLVbreLn

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-builder-from-natural-language-b4230b4e -d '<json body>'
```

Example prompt: Can you build me a regex that matches US phone numbers in formats like (555) 867-5309 or 555-867-5309, and give me a test string that it should match?

## When to prefer this

Choose this endpoint when you need to quickly convert a plain-English pattern description into a working regex without writing it yourself — especially useful for developers, data engineers, or agents that need to validate or extract text patterns on the fly. Prefer this over generic LLM chat when you need a structured, ready-to-use regex + test string output rather than a free-text explanation.

## Known failure modes

- Ambiguous or contradictory natural-language description may produce an incorrect or overly broad regex
- Very complex pattern requirements may exceed the model's ability to produce a correct single-pass regex
- The test string may not cover edge cases or negative matches
- Service may be temporarily unavailable if the Cloudflare tunnel or local RTX 5090 host is offline
- Response latency may spike under concurrent load on shared local hardware

## How this service works

Build a regex from a natural-language description. Returns just the regex + one test string.

## Output

Returns the generated regex pattern as a string and one example test string that the regex should match, allowing immediate validation of the pattern.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "usage": {
   "type": "object"
  },
  "choices": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/regex-builder-from-natural-language-b4230b4e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pearl-valium-stickers-upc.trycloudflare.com](https://www.zero.xyz/host/pearl-valium-stickers-upc.trycloudflare.com/llms.txt)
