Regex Tester
Tests a regular expression against sample text with named groups, spans and flags, under a hard timeout that blocks catastrophic backtracking.
POST /v1/developer/regex-test $0.005 per call
Specification
- Endpoint
POST /v1/developer/regex-test- Price
- $0.005 per call · tier
basic_data - Payment
-
x402 on X Layer (chain 196) · settled in USDG or USDT0 · schemes
exact,aggr_deferred - Data source
- Deterministic local computation on caller-supplied input
- Timeout
- 15 seconds
- Max request
- 2 MB
- Version
1.0.0
Calling it
The first call returns a 402 with the payment challenge. Retry with a
signed authorisation in the X-PAYMENT header — see
the payment guide for the exact shape.
curl -i -X POST "https://api.dana-edu.pp.ua/v1/developer/regex-test" \
-H "content-type: application/json" \
-d '{ ... }' Response
Real output, captured by running this endpoint at build time — not written by hand. Volatile fields such as timestamps are elided. Captured 2026-07-30.
{
"pattern": "(?P<user>[\\w.]+)@(?P<domain>[\\w.]+)",
"mode": "findall",
"flags_applied": [],
"match_count": 2,
"group_names": [
"user",
"domain"
],
"group_count": 2,
"matches": [
{
"index": 0,
"match": "dana@example.com",
"start": 9,
"end": 25,
"groups": {
"user": "dana",
"domain": "example.com"
},
"positional_groups": [
{
"index": 1,
"value": "dana",
"start": 9,
"end": 13
},
{
"index": 2,
"value": "example.com",
"start": 14,
"end": 25
}
]
},
{
"index": 1,
"match": "sales@bazaar.io",
"start": 29,
"end": 44,
"groups": {
"user": "sales",
"domain": "bazaar.io"
},
"positional_groups": [
{
"index": 1,
"value": "sales",
"start": 29,
"end": 34
},
{
"index": 2,
"value": "bazaar.io",
"start": 35,
"end": 44
}
]
}
],
… truncated for display Trimmed for display. The full body is returned by the endpoint and described by its schema.
Every response is wrapped in the same envelope: data plus
warnings, sources, confidence,
informational_only and a measured processing_ms.
See the envelope reference.
Related endpoints
JSON Validator
Validates a JSON document and, on failure, returns the precise line, column, byte offset and parser reason.
JSON Repair
Repairs malformed JSON — trailing commas, unquoted keys, single quotes, smart quotes, code fences, truncated tails — and lists every repair applied.
JSON Schema Inference
Infers a JSON Schema (draft 2020-12) from one or more sample documents, merging types and marking fields optional when absent from any sample.
JSON Schema Validator
Validates an instance against a supplied JSON Schema and returns every error with its instance path and schema path.