Regex Tester
Highlight matches in real time, show capture groups, with g/i/m toggles
How to use
- Enter a pattern in the "Regular expression" box, e.g.
(\w+)@(\w+)\.(\w+). - Toggle the g / i / m switches as needed.
- Fill the sample in "Test text" and click "Test".
- Tip: check g to highlight all matches; otherwise only the first is shown.
FAQ
Why is only one match highlighted sometimes?
Without g (global) checked, the regex matches only the first result. With g it highlights all matches.
What is shown for empty capture groups?
Groups that did not participate in the match show as "undefined", which is normal and usually happens when an optional group is unmatched.