Developer Tools

Regex Tester

Test JavaScript regular expressions with live highlighting, all flags, capture groups, and replace mode.

//
3 matches found
Some emails: [email protected], [email protected], [email protected] Phone: 555-123-4567 A URL: https://utility-pages.com/regex-tester

A faster regex sandbox

Type your pattern, type test data, see matches highlighted instantly. Toggle flags (g/i/m/s/u/y) with checkboxes. Switch to replace mode to test substitutions with $1, $2 backreferences. All in your browser, all free.

Frequently Asked Questions

What regex flavor does this support?
JavaScript / ECMAScript 2018+ regex (the same as RegExp in your browser/Node). Most syntax is portable to PCRE (PHP, Python re module, Ruby) but some advanced features (lookbehinds, named groups) have varying support across languages.
What do the regex flags mean?
g = global (find all matches), i = case-insensitive, m = multiline (^/$ match line breaks), s = dotall (. matches newline), u = unicode (full Unicode support), y = sticky (match at lastIndex only).
Why doesn't my regex match?
Common reasons: forgot to escape special chars (. + * ? ( ) etc.), wrong flag (need /i for case-insensitive), greedy matching when you wanted lazy (use .*? instead of .*), or the pattern doesn't actually match. Use the highlight to see where matches occur.
How do capture groups work?
Parentheses (...) create a capture group. The matched substring is available as $1, $2, etc. in replace, or as result[1], result[2] in match. Named groups: (?<name>...). Non-capturing groups: (?:...) — no result slot, useful for grouping without capturing.
Is this tool sending my regex to a server?
No. Everything runs in your browser via the native RegExp engine. Your patterns and test data never leave your device — safe for sensitive logs or proprietary patterns.

Related Calculators