Regex Tester
Test regular expressions against text in your browser — no data leaves your machine.
How this works
Enter a pattern and a test string to see every match highlighted, plus any captured groups. Matching always runs in a background worker with a timeout, so a runaway pattern can't freeze the page.
Common uses
- Building or debugging a validation pattern (emails, phone numbers, slugs) before shipping it in code
- Checking exactly which part of a string a pattern captures, via the highlighted matches and group list
- Verifying a pattern doesn’t accidentally match more — or less — than intended, against real sample text
FAQ
Which regex flavor does this use?
Your browser’s native JavaScript RegExp engine — the same one Node.js and any JS codebase uses.
What happens with a catastrophic pattern like (a+)+$?
It’s stopped automatically after about a second. Matching runs in a background worker with a timeout, so a pathological pattern can’t freeze the tab.
Why did I get more matches than I expected?
The tester always searches globally (it adds the g flag internally) so you can see every match, even if you didn’t type g yourself.