Regex Tester & Debugger

LocalRuns in your browser; files and input stay on this deviceFreeFree to use

Test JavaScript regular expressions against sample text. See live match highlights, capture groups, and supported flags.

Regular expression
//

Flags: g global, i ignore case, m multiline, s dot all, u unicode, y sticky.

Test text
Highlighted matches
Test your regex against this sample text!
7 matches
Runs in your browser; files and input stay on this device

How to use Regex Tester & Debugger

  1. 1Enter a JavaScript regular expression without surrounding slashes.
  2. 2Choose the flags you need and paste the text to test.
  3. 3Review highlighted matches, the match count, and capture groups; correct the pattern if an error appears.

Frequently asked questions

Which regular-expression syntax does this tester use?
It uses the JavaScript RegExp engine and supports the g, i, m, s, u, and y flags exposed in the interface.
What does the global flag change?
Without g, JavaScript returns the first match. With g enabled, the page finds and highlights every non-overlapping match.
Why are capture groups shown only for the first match?
The summary reports the groups captured by the first match while the highlighter still marks all matches selected by the flags.