$ man regex-test
/regex-test
PRICE / CALL
$0.002
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
wordmintCATEGORY
ai
STATUS
● live
NAME
regex-test — regex tester / pattern matcher / regex playground / verify-a-pattern / match-and-capture extractor
SYNOPSIS
POST https://x402.agentutility.ai/regex-test
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Regex tester / pattern matcher / regex playground / verify-a-pattern / match-and-capture extractor. Takes a JavaScript regex (pattern + flags) and an array of test inputs, returns per-input matched / not-matched verdict, every match with byte index, all numbered capture groups, and named groups (?<name>...). No LLM, pure JS RegExp via `new RegExp()`, deterministic. Catches catastrophic-backtrack-shaped patterns up front (nested unbounded quantifiers) and rejects them with a clear error. Companion to regex-from-prompt: that one generates a pattern from natural language, this one tells you whether your pattern actually matches what you think it matches.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| pattern | string | JavaScript regex pattern (without surrounding slashes). Max 500 chars. | required |
| flags | string | Optional JS regex flags string like 'gi', 'u', 'ms'. Standard JS flags only (g i m s u y d v). | optional |
| inputs | array | 1-100 test strings. Each string max 5000 chars. | required |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| pattern | string | Echo of the input pattern. |
| flags | string | Echo of the input flags string. |
| input_count | number | Total number of inputs tested. |
| matched_count | number | How many inputs had at least one match. |
| unmatched_count | number | How many inputs had zero matches. |
| results | array | Per-input result objects: input, input_index, matched boolean, match_count, truncated flag (when capped at 100 matches), and matches array. Each match has the full match string, start index, numbered groups array, and named groups object. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/regex-test \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# MCP packages on npm under # @agentutility/mcp-* (one per cluster) # # Catalog + install: # https://mcp.agentutility.ai # # Or call regex-test directly over HTTP — see above.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- wordmintregexpattern-matchingregex-testercapture-groupsnamed-groups
- methods
- POST
- cluster
- wordmint
- price
- $0.002 USDC per call
ADJACENT — other endpoints in wordmint
| endpoint | description | price |
|---|---|---|
| cron-explain | Cron expression explainer / cron parser / scheduling translator. | $0.002 |
| cron-parse | Cron parser. | $0.002 |
| dictionary-define | English dictionary / word definition / lookup word / pronunciation / part of speech / synonyms / etymology adjacent. | $0.002 |
| embedding-similarity | Embedding similarity / cosine similarity / semantic match / vector compare / are-these-strings-similar. | $0.002 |
| semantic-chunk | Semantic chunker / text splitter / RAG chunker / chunking with overlap / sentence + paragraph aware. | $0.002 |
| text-embedding | Text embedding / vector embedding / semantic vector / Venice embeddings / Gemini embeddings / BGE-M3. | $0.002 |
| thesaurus | Thesaurus / synonyms / antonyms / similar words / rhymes / Datamuse / paraphrasing / query expansion. | $0.002 |
| content-simhash | SimHash / 64-bit content fingerprint / near-duplicate detection / dedup hashing / locality-sensitive hash. | $0.001 |
SEE ALSO