Skip to content
toolbelt

Regex Tester

Test regular expressions in real-time. See highlighted matches, named capture groups, exact character indexes, and test replacement strings with JavaScript flavors.

read guide

Pattern & Test String

Matches (0)

No matches found...

Highlighted

Nothing to highlight

Replace

About this tool

The Regex Tester allows you to write and debug regular expressions in real-time. It shows you exact matches, capture groups, and character indices as you type, making it easier to build complex validation rules.

How to use it

  1. Enter your regex pattern.
  2. Toggle flags like global (g) or case-insensitive (i).
  3. Paste a test string to see the matches highlighted.

Examples

Testing an email regex

\b\w+@\w+\.\w+\b
Match found: test@example.com

Limits and notes

  • Uses JavaScript (ECMAScript) regex syntax.
  • Catastrophic backtracking can occur with poorly written patterns.

Frequently asked questions

What flags are supported?
g, i, m, s, u, and y.
Does it support lookaheads?
Yes, standard JS lookaheads and lookbehinds are supported.

Want the details? Read the full guide: Debugging a Regex That Works in Your Head.