Live Highlighting · Capture Groups · No Upload

Regex Tester

Write and debug regular expressions with instant match highlighting, flag toggles (g, i, m, s), and detailed capture group extraction.

//g
Flags:
Quick patterns:

Regex Flags Reference

g

Global

Find all matches, not just the first one

i

Insensitive

Case-insensitive matching (a matches A)

m

Multiline

^ and $ match the start/end of each line

s

Dotall

The dot . matches newlines as well

Frequently Asked Questions

What regex flavour does this use?

This tool uses the JavaScript ECMAScript regular expression engine (built into all modern browsers). It supports standard regex syntax including lookaheads, backreferences, named capture groups, and unicode properties.

How do I capture groups?

Wrap parts of your pattern in parentheses. For example /([a-z]+)@([a-z]+)\.([a-z]+)/i captures 3 groups from an email address. The tool shows each group's matched text in the details panel.

Is there a limit on how many matches are shown?

Yes, the tool displays up to 500 matches to keep the browser responsive. For most real-world patterns this limit is never reached.