Regex Tester Tool

Test JavaScript regular expressions with live highlights, capture groups, and replace.

/ / g

About the Regex Tool

Test JavaScript regular expressions on a text sample in real time. Matches are highlighted inline and listed with their position, capture groups, and named groups. Switch to Replace mode to preview the substituted output without leaving your browser.

Tips

  • The g flag is added automatically when listing matches.
  • Use named groups with (?<name>...) and reference them in replacements with $<name>.
  • Patterns are compiled with the JavaScript engine, so syntax follows ECMAScript regex.