Processed locallyLive matchingGroupsReplacement preview

Regex tester

A browser regex tester with live match highlighting, capture and named groups, replacement preview and a syntax cheat sheet. Everything runs locally.

Regular expression

Live matching, groups, replacement preview and a syntax cheat sheet. Everything runs locally in your browser.

0 matches
//gi
Examples

Test text

54 characters
Highlighted resultMatches are highlighted
Contact dev@xwrt.dev or hello@example.com for details.

Replacement preview

Contact dev@xwrt.dev or hello@example.com for details.
const re = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/gi;

Matches

Shows the full match, range, capture groups and named groups.

0 results

No matches

Try adjusting the pattern or test text.

Cheat sheet

Common syntax
\ddigit
\wword character
\swhitespace
.any character except newline
*zero or more
+one or more
?zero or one
{n,m}between n and m
[abc]character set
[^abc]negated set
(...)capture group
(?:...)non-capturing group
(?<name>...)named group
(?=...)positive lookahead
(?!...)negative lookahead
^ / $start / end of line
a|balternation

Regex runs locally in your browser; matching uses a Web Worker and aborts after 1.2 seconds to keep the page responsive.