Regex Tester -- Test Regular Expressions

Test and debug regular expressions with real-time match highlighting. Free online regex tester with flag toggles (g, i, m, s), match groups, and match count.

Loading tool...

Frequently Asked Questions

How do I test a regular expression?

Enter your regex pattern in the pattern field, type or paste your test string below, and matches are highlighted in real-time. Toggle flags (global, case-insensitive, multiline, dotAll) to modify matching behavior. Match count and group details are shown below.

What regex flags are supported?

This tool supports four flags: g (global - find all matches), i (case-insensitive), m (multiline - ^ and $ match line boundaries), and s (dotAll - dot matches newlines). Toggle each flag independently to see how it affects your matches.

Does this tool show capture groups?

Yes. When your regex contains capturing groups (parentheses), the tool displays each group's matched content. Named groups and numbered groups are both shown, making it easy to debug complex patterns with multiple captures.

Is this regex tester JavaScript-compatible?

Yes. This tool uses JavaScript's native RegExp engine, so your patterns will work identically in any JavaScript environment (Node.js, browsers, Deno). The syntax and behavior match exactly what you would get in your code.

Built by Michael Lip. 100% client-side — no data leaves your browser.