Regex tester

Write a pattern and see every match highlighted as you type.

Runs entirely in your browser. Nothing you type is sent anywhere.

//


  
#PositionMatchGroups

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.

  1. Type a pattern without the surrounding slashes.
  2. Tick the flags you need.
  3. Paste your test text. Matches are highlighted and listed with their groups.
  4. 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.