🔍 Regex Tester
Test, debug and preview regular expressions live
Load example:
Highlighted matches
Matches
| # | Match | Index |
|---|---|---|
| 1 | [email protected] | 14 |
| 2 | [email protected]. | 35 |
Replace
Result preview
\dAny digit (0-9)
\wWord character (a-z, A-Z, 0-9, _)
\sWhitespace (space, tab, newline)
.Any character except newline
^Start of string / line (with m)
$End of string / line (with m)
*0 or more of the previous token
+1 or more of the previous token
?0 or 1 (optional) of the previous token
{n,m}Between n and m repetitions
[abc]Any one of a, b, or c
[^abc]Any character except a, b, or c
(...)Capture group
(?<name>...)Named capture group
a|bMatch a or b
\bWord boundary
Test and debug regular expressions with live match highlighting. Type a pattern and some test text to see every match, capture group and the effect of flags in real time, plus a replace preview — all processed in your browser.
Frequently asked questions
How do I test a regular expression?
Enter your regex pattern and the flags you want (like g for global or i for case-insensitive), then paste the text to test against. Matches are highlighted instantly and capture groups are listed below.
What regex flavor does this use?
It uses the JavaScript (ECMAScript) regular expression engine — the same one that runs in browsers and Node.js — so patterns behave exactly as they will in your JavaScript code.
Can I preview a find-and-replace?
Yes. Enter a replacement string (with $1, $2 for capture groups) to see the replaced output update live alongside your matches.