Developer Tools

Regular Expression Tester & Matcher

Test and debug regular expressions with live matching, capture group highlighting, and detailed match information. Supports all JavaScript regex syntax including lookaheads, lookbehinds, named groups, and Unicode. Matches update in real-time as you type.

Part of Yoopla's 435+ free browser tools.

//

Common Regex Patterns:

^\d{3}-\d{3}-\d{4}$Phone number
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$Email
^https?://URL
#[0-9A-Fa-f]{6}Hex color
\b[A-Z]{2,}\bAcronyms
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}IP address

How to Use Regex Tester

  1. 1

    Enter your regular expression pattern in the pattern field (no slashes needed).

  2. 2

    Select flags: g (global, find all matches), i (case-insensitive), m (multiline), s (dotAll), u (Unicode).

  3. 3

    Type or paste your test string in the text area — matches are highlighted in real-time.

  4. 4

    Click on any match to see the full match details and captured groups.

  5. 5

    Use the substitution field to test replace operations with $1, $2 backreferences.

Frequently Asked Questions

What regex flags are available and what do they do?

g (global): find all matches instead of stopping at the first. i (case-insensitive): treat uppercase and lowercase as equal. m (multiline): makes ^ and $ match start/end of each line, not just the whole string. s (dotAll): makes the dot match newlines too. u (Unicode): enables full Unicode support including named character class escapes.

How do capture groups work?

Parentheses create a capturing group. Everything matched inside the parentheses is captured separately. For example, a pattern like (year)-(month)-(day) on a date string captures three groups. Named groups use the (?<name>...) syntax. The tool shows all captured groups per match in different colors.

What is the difference between greedy and lazy quantifiers?

Greedy quantifiers (*, +, ?) match as much text as possible. Lazy versions (*?, +?, ??) match as little as possible. For example, matching an HTML tag greedily on a string with multiple tags will match from the first opening tag all the way to the last closing tag. Adding ? after the quantifier makes it stop at the first closing tag instead.

Which regex syntax does this tool support?

The tool uses JavaScript (ECMAScript) regex, which supports: character classes like [a-z], anchors ^ and $, lookaheads and lookbehinds, named capture groups, Unicode property escapes, and backreferences. PCRE-only features like atomic groups and possessive quantifiers are not supported.

How do I match special characters like dots, asterisks, and parentheses literally?

Escape them with a backslash. A backslash before a dot matches a literal dot, not any character. A backslash before an asterisk matches a literal asterisk. To match a literal backslash, use two backslashes. Inside character classes [], most special characters lose their special meaning and match literally.

Share this tool

Share this tool with others

Related Tools

Explore the ecosystem around

Category: Developer Tools

Use this tool as your starting point, then branch into adjacent tools, topic hubs, comparisons, and free alternatives.

Related Tools

Discover other tools that work great with Regex Tester

Topic Hubs

Go deeper into pillar pages and connected workflows

Related Articles & Guides

Learn more about using tools effectively

Tool Comparisons

Compare features and choose the right tool

Popular Alternatives

Free alternatives to popular paid tools

Use Cases

Practical use cases with this tool

Best Tools Collections

Curated lists of top-rated tools

Regex Tester — Test Regular Expressions with Live Matching | Yoopla