Regex Tester

Test JavaScript regular expressions with live match highlighting. See all matches and capture groups. Test replace output. Includes a library of common patterns for URLs, emails, phone numbers, UUIDs, and more.
Developer Utility
Test regex here before deploying to a redirect rule, a GTM trigger, or a Search Console filter.
Every regex in production started on a test string. Catch the . that should have been \\., the + that was too greedy, or the (.*) that captured too much before it costs you.
Pattern
/ /
Common patterns
Test string
Input
Matches highlighted
0 matches
Replace
Result
Match details
#MatchIndexGroups
Frequently asked questions
What regex flavour does this tool support?
ECMAScript (JavaScript) regex. The flavour your browser and Node use. Most modern languages are compatible with the common subset.
What flags are available?
g (global), i (case-insensitive), m (multiline), s (dotall), u (unicode), y (sticky). Toggle each in the UI.
Why does my regex work on regex101 but not here?
Regex101 defaults to PCRE which supports features (like lookbehind variants) that older browsers don't. Make sure you're testing against the JS flavour on regex101.
How do named groups work?
(?<name>pattern) captures into a named group. Access via match.groups.name in JS.
What is lookbehind?
(?<=foo)bar matches "bar" only when preceded by "foo". JS supports both lookbehind variants since 2018.
How to match newlines with .?
Dot doesn't match newlines by default. Add the s (dotall) flag.
How to make matching case-insensitive?
Add the i flag or embed (?i) at the start of the pattern.
What is greedy vs lazy matching?
Greedy (.*) matches as much as possible. Lazy (.*?) matches as little. Add ? after a quantifier to make it lazy.
How do I escape special characters?
Backslash: \. for literal dot, \$ for literal dollar sign. The tool highlights unescaped specials.
How to replace captured groups?
$1, $2 in the replacement. Named groups: $<name>.
Can I test multiline strings?
Yes. Paste the full multi-line text. Use the m flag so ^ and $ match line boundaries.
Free · no account

SEORCE for Chrome, Edge and Firefox

Audits the page you are on: headings, meta tags, schema, indexability, and whether AI crawlers can read it. Export the result as a PDF. Free, with no account.

It audits one page at a time and does not track AI answers. About the extension

Across the whole site

One check here. Every page in SEORCE.

This tool does one job. SEORCE Technical Suite crawls your whole site with fast and secure crawlers and ranks technical issues by impact. AutoFix applies fixes for meta tags, schema, canonical tags, image alt text, headings and internal links for orphan pages on your live site, through one script tag, and the list keeps growing.
3,000+ users · Free forever plan, no card needed