Regex Tester
Write a pattern, paste a test string, and see matches highlighted live with their capture groups and positions.
No matches yet.
How to use this regex tester
Type a regular expression pattern into the first field, adjust the flags if needed (defaults to global matching), then paste or type the text you want to test in the box below. Results update live: the test string is re-rendered with every match wrapped in a highlight, and a table below lists each match's position along with any numbered or named capture groups.
Why test regex before shipping it
Regular expressions are notoriously easy to get subtly wrong — an unescaped character or a greedy quantifier can match far more, or far less, than intended. Testing against real sample data before dropping a pattern into validation logic or a data-extraction script catches these edge cases early, and seeing capture groups broken out separately makes it obvious whether your groups are indexed the way your code expects.