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 |
|---|
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.