Quick answer
The Match Debugger runs your regex against the test string.
Match Debugger Invalid Pattern
The Match Debugger runs your regex against the test string. If the pattern has a syntax error (unclosed group, bad escape, invalid quantifier), the debugger cannot run and shows an error.
Common causes
- Unclosed bracket or parenthesis in the regex (e.g. [a-z or (group).
- Invalid escape (e.g. \k without a named group).
- Quantifier applied to nothing (e.g. * or + at the start).
How to fix
- Match every [ ( { with a closing ] ) }.
- Use valid escapes: \d \s \w \n \t or \ then a special character.
- Ensure * + ? apply to a preceding token.
- Use Regex Tester or Match Debugger to see the exact error message.
Examples
Bad
[a-z
Good
[a-z]+
FAQ
- What does Match Debugger show?
- Start index, end index, length, matched text, and capture groups for each match. Use it when you need character positions for debugging.
- Same API as Regex Tester?
- Yes. Match Debugger uses POST /api/v1/test/regex with the same body (pattern, testString, flags).
Fix it now
Try in validator (prefill this example)