Regex Tester

Test regular expressions live, with match highlighting and groups.

Loading Regex Tester…

How to use Regex Tester

  1. Type your pattern and toggle the flags you need (g, i, m, s, u).
  2. Paste the text to test against. Every match is highlighted live.
  3. Check the capture groups listed for each match.
  4. Add a replacement string to preview a replace before you run it in code.

About Regex Tester

A live regular-expression tester. As you edit the pattern, matches are highlighted inline in your test string, every match and its capture groups are listed with positions, and a running count shows how many matches were found.

All five JavaScript flags are one-click toggles: global (g), ignore-case (i), multiline (m), dotall (s) and unicode (u). An optional replacement field with $1/$2 references previews the substituted result.

What people use it for

Frequently asked questions

Which regex flags are supported?

g, i, m, s and u. Toggle each independently. The engine is the browser's native JavaScript RegExp.

Can I see capture groups?

Yes. Every match lists its numbered groups ($1, $2, …) and the index where it occurred.

Is there a replace preview?

Yes. Add a replacement string with $1/$2 references and the substituted output appears live.

Is it private?

Every calculation happens on this page, in your own browser. Your input is never sent to a server and never logged, which also means the tool keeps working when you are offline.

Related tools

All Strings & Text tools · Every tool on OmniWebTools