Regex Tester
Live match highlighting, capture groups, instant feedback.
How to debug regular expressions
Type your pattern and paste sample text — every match is listed below with its position, the full matched text and any capture groups. Errors in the pattern (unmatched brackets, invalid escapes) are reported immediately instead of failing silently in production.
Capture groups are the key to writing robust patterns: each match shows what group 1, 2, 3… captured, so you can confirm the pattern extracts exactly the pieces you need before embedding it in code.
The tester uses JavaScript regex syntax — the same engine as Node.js and every browser, so results transfer directly to your code.
FAQ
What flags can I use?
g (all matches), i (case-insensitive), m (multiline ^ and $), s (dot matches newline) and u (unicode). Without g, only the first match is returned — the same behavior your code will have.
Why do overlapping matches not appear?
Regex engines continue scanning after the end of each match; matches never overlap. If you need overlapping hits, use lookahead around the core: (?=(pattern)).
Does it support lookbehind?
Yes — modern browsers support lookbehind (?<=...) and negative lookbehind (?<!...) in JavaScript regex.