Regex tester
Write a pattern and see every match highlighted as you type.
Runs entirely in your browser. Nothing you type is sent anywhere.
//
| # | Position | Match | Groups |
|---|
Did this tool do the job?
Tell us privately. Ratings and messages come only to the Gauritanaya team and are never shown on the site.
Please don’t include personal details such as Aadhaar, PAN or account numbers. We use this only to fix and improve the site. How feedback is handled
How to use the regex tester
Patterns use JavaScript regular expression syntax. Each test runs in a separate worker with a time limit, so a pattern that would hang stops safely.
- Type a pattern without the surrounding slashes.
- Tick the flags you need.
- Paste your test text. Matches are highlighted and listed with their groups.
- Turn on the replace preview to try a replacement.
Questions
Which regex flavour is this?
JavaScript, as built into your browser. Most syntax matches other languages, but lookbehind and named-group details can differ from Python or PCRE.
Why did my pattern stop?
Patterns with nested repeats, like (a+)+, can take forever on some text. The tester stops after one second so the page doesn’t freeze.