Developer Tools

Regular Expression Tester

Test a JavaScript regular expression and list every match with its position.

Free to use No account needed Quick result

Tool workspace

Private by design

Your result

Your result will appear here…

About the Regular Expression Tester

The Regex Tester compiles JavaScript expression syntax, guards against zero-length global loops and reports matched text, indexes and capture groups. An optional replacement preview uses the same expression.

How to use the Regular Expression Tester

  1. Enter the pattern without surrounding slash delimiters.
  2. Add valid flags such as g, i, m, s, u or y.
  3. Test matches and inspect the optional replacement preview.

Practical tips

  • Add the g flag to collect every match rather than only the first.
  • Test hostile or very large input cautiously because some patterns can backtrack heavily.
Helpful answers

Regular Expression Tester FAQs