Regex Tester

Run pattern matching and replacement preview locally in your browser.

How to use

  1. Enter your regex pattern and choose flags like g, i, or m.
  2. Paste test text and click Run to inspect match positions and values.
  3. Set replacement text to preview transformed output before applying elsewhere.

FAQ

Why are no matches returned?

Check escaping, flags, and whether your pattern expects full-string vs partial matches.

Does this tool support capture groups in replacement?

Yes. You can use replacement tokens like $1, $2, etc., just like standard JavaScript replace.