Regex Tester
Test regular expressions with live matches & groups.
How to use
- 1 Enter your regular expression and any flags.
- 2 Paste the text to test against.
- 3 Inspect the highlighted matches and capture groups.
- 4 Refine the pattern until it matches what you intend.
About Regex Tester
The Regex Tester runs a JavaScript regular expression against your sample text and shows every match, its position, and all capture groups — both numbered and named.
Toggle flags (global, case-insensitive, multiline, dotAll, unicode, sticky) and watch the results update.
Invalid patterns and bad flags produce a clear message instead of failing silently.
Regular expressions are notoriously fiddly; a tester that shows you exactly what matches saves hours of guesswork when you are writing validation, parsing logs, or doing a find-and-replace.
To keep things safe, the matching runs in an isolated context guarded against pathological "catastrophic backtracking" patterns.
Everything stays in your browser.
FAQ
Which regex flavour is this?
JavaScript (ECMAScript) regular expressions — the same engine browsers and Node use.
Does it support named groups?
Yes — named capture groups like (?<year>\\d{4}) are shown alongside numbered groups.