Regex Tester
Test regular expressions with live match highlighting and capture groups.
A regular expression is easy to write and hard to verify by reading. This tester shows every match highlighted in your sample text, lists the capture groups, and updates as you type, so you can see what the pattern actually does rather than what you intended.
Patterns run in a Web Worker with a timeout, so a pattern that backtracks catastrophically stops the worker instead of freezing the page.
How to use it
- Type your pattern, without the surrounding slashes.
- Set flags — g for all matches, i for case-insensitive, m for multiline.
- Paste sample text and watch the matches highlight.
- Read the capture groups for each match.
Not working as you expect? Report a problem with this tool.