🔍

Regex Tester

Test regular expressions

Frequently Asked Questions

How do I test a regular expression?

Enter your regex pattern in the pattern field and test text below. Matches are highlighted in real time. The tester shows match groups, capture groups, and their positions. Flags (g, i, m, s) are configurable.

What regex flags are available?

g (global): find all matches. i (case-insensitive): ignore case. m (multiline): ^ and $ match line boundaries. s (dotAll): dot matches newlines. u (unicode): enable Unicode matching. The tester lets you toggle each flag.

Can I see what each part of my regex does?

Yes. The tester includes a regex explainer that breaks down your pattern into plain English. For example, \\d{3}-\\d{4} is explained as "3 digits, followed by a hyphen, followed by 4 digits".

Does the tester support different regex flavors?

The tester uses JavaScript regex by default. Common patterns work across most languages. Lookbehind (?<=...) is supported in modern browsers. The tester notes when a pattern uses JavaScript-specific features.

Can I use the tester for find-and-replace?

Yes. Enter a replacement pattern using $1, $2 for capture group references. The tester shows the replacement result in real time. Named groups use $<name> syntax. This is useful for testing before applying in your code.