Tools Hub

Regex Tester

Test regular expressions with live match highlighting. Supports flags (g, i, m) and shows capture groups.

Examples:
//

Matches highlighted — 2 matches found

Contact us at [email protected] or [email protected] for help.

Match Details

#1[email protected]idx 14
#2[email protected]idx 35

JavaScript regex sandbox with live highlights

Dialect differs from PCRE or POSIX—verify lookbehind support in your target engines. Use flags g/i/m/s deliberately: dotAll (s) changes “.” semantics dramatically.

Redact PII before sharing regex screenshots; logs often contain emails and phone numbers.

These free tools pair well with this page — open them in a new tab to finish your workflow.

Frequently Asked Questions

What regex engine does this tool use?

This tool uses the JavaScript RegExp engine built into your browser. JavaScript regex supports most common features: character classes, quantifiers, lookaheads, groups, and backreferences. It lacks some features found in PCRE, such as lookbehind of variable length (older browsers) or atomic groups.

What do the regex flags mean?

The common flags are: g (global — find all matches, not just the first), i (case-insensitive), m (multiline — ^ and $ match start/end of each line), s (dotAll — . matches newlines too), and u (unicode — enable full Unicode support).

How do I match a literal dot or special character?

Escape it with a backslash. A dot (.) in regex matches any character; to match a literal dot, write \.. Similarly, to match \, (, ), [, ], {, }, *, +, ?, ^, $, |, use a backslash before each.

What is a capturing group vs a non-capturing group?

A capturing group (parentheses: ()) captures the matched text and makes it available as $1, $2, etc. A non-capturing group (?:...) groups without capturing — useful when you want to apply a quantifier without capturing the content.

What are lookaheads and lookbehinds?

A lookahead (?=...) asserts that a pattern must follow the current position without consuming characters. A lookbehind (?<=...) asserts a pattern must precede. For example, \d+(?= dollars) matches a number followed by ' dollars' without including ' dollars' in the match.

Regex Tester | Tools Hub