Regex Tester

Test and debug regular expressions with live matching, capturing groups, and replace functionality. 100% free and private - all processing happens in your browser.

Quick Patterns

/

Replace

Live Matching

See matches highlighted in real-time as you type your pattern.

Capturing Groups

View all capturing groups for each match in a detailed table.

Replace Preview

Test replace operations with support for group references.

Frequently Asked Questions

How do I test a regular expression?

Enter your regex pattern in the pattern field, add test text in the test string area, and see matches highlighted in real-time. Toggle flags like "g" (global) and "i" (case-insensitive) to modify behavior.

What are regex flags and what do they mean?

Regex flags modify how patterns match: "g" (global) finds all matches, "i" (case-insensitive) ignores case, "m" (multiline) matches across lines, "s" (dotAll) makes dot match newlines, "u" (unicode) enables unicode support, and "y" (sticky) matches at exact position.

How do I see capturing groups in my regex?

Use parentheses in your pattern like (\w+)@(\w+)\.(\w+) for email. The Match Details table shows all groups captured for each match.

Can I use this tool to test regex replace?

Yes! Enter a replacement string to see how the regex replace would work. Use $1, $2, etc. to reference capturing groups in the replacement.

Is my data private when using this regex tester?

Absolutely. All regex testing happens in your browser. Your patterns and text never get sent to any server.

What are common regex patterns I can use?

Use the "Quick Patterns" section to load pre-built patterns for email, URL, phone, date, hex color, IP address, username, and HTML tags.