Regex Tester

Test a regular expression against sample text. See matches highlighted live.

100% in your browser · No uploads
//gi
Matches (2)
The quick brown fox is jumping over the sleeping dog.
  • [23] jumping · groups: $1=jumping
  • [40] sleeping · groups: $1=sleeping

What this does

Regex Tester runs a regular expression against sample text and highlights every match in real time. Shows match positions, captured groups, and explains errors when the pattern is invalid.

When to use it

  • Building a regex for a script or codebase before committing to it
  • Debugging why a regex isn't matching what you expect
  • Learning regex by experimenting with patterns
  • Extracting structured data from logs or text

Frequently asked

What regex flavor does it use?

JavaScript regex (ECMAScript). It's very close to most other flavors but lacks some PCRE features (lookbehind support depends on browser).

What do the flags mean?

g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line breaks), s = dotall (. matches newlines), u = Unicode, y = sticky.