{"slug":"aayatai-com-regex-explain-d66e0a","title":"Validate and explain a regular expression (JavaScript flavour)","host":"aayatai.com","method":"POST","resource":"https://aayatai.com/regex/explain","category":"code","description":"Validate and explain a regular expression (JavaScript flavour): is it valid, what each part means in plain English, whether it risks catastrophic backtracking (ReDoS), and what it matches in up to 20 test strings (with groups). POST {pattern, flags, tests}.","price_listed":0.001,"price_asked":0.001,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":17,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:137","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"flags":"","pattern":"^(\\d{3})-(\\d{4})$","tests":["555-1234","5551234"]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"flags":{"description":"JavaScript flags: g i m s u y d v.","maxLength":8,"type":"string"},"pattern":{"description":"The regex source, without slashes, e.g. ^(\\d{3})-(\\d{4})$","maxLength":500,"minLength":1,"type":"string"},"tests":{"description":"Strings to try it on.","items":{"maxLength":500,"type":"string"},"maxItems":20,"type":"array"}},"required":["pattern"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"error":{"description":"The syntax error if invalid.","type":["string","null"]},"flags":{"type":"string"},"groups":{"description":"Number of capturing groups.","type":"integer"},"parts":{"items":{"type":"object"},"type":"array"},"pattern":{"type":"string"},"risk":{"description":"Why it may backtrack catastrophically, or null. Tests are not run when set.","type":["string","null"]},"tests":{"items":{"type":"object"},"type":"array"},"valid":{"type":"boolean"}},"required":["valid","error","parts","risk","tests"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-28","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001,"price_match":true,"latency_ms":17,"error":null}],"description_full":"Validate and explain a regular expression (JavaScript flavour): is it valid, what each part means in plain English, whether it risks catastrophic backtracking (ReDoS), and what it matches in up to 20 test strings (with groups). POST {pattern, flags, tests}.","last_updated":"2026-09-28T10:46:02.655Z","schemes":["exact"]}