Regex Tester
Live regex playground: match highlighting, capture groups, substitution, and explanations.
Test string
Match highlight
Also invalid: not-an-email and a@b.
Match information
Explanation
(?<user>Named capturing group "user"\wMatches any word character [A-Za-z0-9_]+Quantifier: 1 or more of previous)Group end@Literal character "@"(?<domain>Named capturing group "domain"[\w.-]Character class — match one listed character+Quantifier: 1 or more of previous\.Literal .\wMatches any word character [A-Za-z0-9_]+Quantifier: 1 or more of previous)Group end
How to use the Regex Tester
Build, test, and debug JavaScript regular expressions in the browser — pattern/flags bar, live match highlighting, match information with capture groups, substitution, token explanation, and a quick reference. Fully client-side.
- 1Enter a pattern and flags (g, i, m, s, u, y) in the expression bar.
- 2Paste test text. Matches are highlighted live and capture groups are listed for each match.
- 3Use the substitution panel to preview replace() output, and check the token explanation to understand the pattern.
Frequently asked questions
Which regex flavor is used?
JavaScript (ECMAScript) regular expressions, as implemented by your browser, including named groups, lookbehind and Unicode property escapes.
Why does my pattern only match once?
Add the g (global) flag to find every match. Without it, JavaScript stops at the first match.
Is my data uploaded anywhere?
No. Everything runs as JavaScript inside this browser tab. The site’s Content-Security-Policy blocks network requests to any other origin, so your input has nowhere to go. It also works offline once loaded.