CaseWren

Regex Tester

Test regex patterns live with highlights and capture groups.

//g
g is always applied so every match is found.
0 Characters

About the Regex Tester

Writing a regular expression against live data is the fastest way to understand it. Paste your test text, type a pattern, and every match lights up in the original string while a detailed list shows each match's position and capture groups — so you can see exactly why a group did or did not capture.

The g, i, m and s flags are one click each (global is always applied so every match is found), and an invalid pattern produces the JavaScript engine's real error message instead of a silent failure. Up to 500 matches are enumerated, which keeps even catastrophic patterns from freezing the page.

How to use it

  1. 1Type your pattern in the regex field — no surrounding slashes needed.
  2. 2Toggle the i, m or s flags if your pattern needs them.
  3. 3Paste the text to test and read the highlighted matches and group table.

Frequently asked questions

Related tools