Regex Tester

Test, debug, and build regular expressions in real-time. Match highlighting, captured groups, replace mode, and pattern explanations — all in your browser.

100% Client-SideNo UploadFree ForeverNo Sign-up
//g
Flags:
4 matches found
Contact us at hello@nebula.com or support@example.org. Our backup is admin@test.net and info@company.co
#MatchIndexGroupsNamed Groups
1hello@nebula.com1430$1: hello$2: nebula$3: com
2support@example.org3453$1: support$2: example$3: org
3admin@test.net6983$1: admin$2: test$3: net
4info@company.co88103$1: info$2: company$3: co
(
Start capture group
\w
Word character [a-zA-Z0-9_]
+
One or more of previous
)
End group
@
Literal "@"
(
Start capture group
\w
Word character [a-zA-Z0-9_]
+
One or more of previous
)
End group
\.
Literal dot
(
Start capture group
\w
Word character [a-zA-Z0-9_]
+
One or more of previous
)
End group
(Start capture group
\wWord character [a-zA-Z0-9_]
+One or more of previous
)End group
@Literal "@"
(Start capture group
\wWord character [a-zA-Z0-9_]
+One or more of previous
)End group
\.Literal dot
(Start capture group
\wWord character [a-zA-Z0-9_]
+One or more of previous
)End group

Character Classes

.Any character (except newline)
\dDigit [0-9]
\DNot a digit
\wWord char [a-zA-Z0-9_]
\WNot a word character
\sWhitespace
\SNot whitespace
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Character range

Quantifiers

*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times
*?0 or more (lazy)
+?1 or more (lazy)

Anchors

^Start of string/line
$End of string/line
\bWord boundary
\BNot a word boundary

Groups & References

(abc)Capture group
(?<name>abc)Named capture group
(?:abc)Non-capturing group
\1Backreference to group 1
(a|b)Alternation (a or b)

Lookaround

(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind

Escapes

\.Escaped dot (literal .)
\\Escaped backslash
\nNewline
\tTab
Ad

Frequently Asked Questions

A regex tester is a tool that lets you write and test regular expressions against sample text in real-time. It highlights matches, shows captured groups, and helps you debug complex patterns without writing code.
Yes, absolutely. All regex processing happens 100% in your browser using JavaScript's native RegExp. Your data never leaves your device and is never sent to any server. There are no uploads, no tracking, and no storage of your data.
This tool uses JavaScript's native RegExp engine, which supports ECMAScript regex syntax including lookahead, lookbehind, named groups, Unicode properties, and all standard flags (g, i, m, s, u, y).
Yes. Toggle Replace Mode to enter a replacement pattern. You can use $1, $2 for numbered group references and $<name> for named group references. The replacement output updates in real-time.
Enable the "m" (multiline) flag so ^ and $ match line boundaries. Enable the "s" (dotAll) flag so the dot (.) matches newline characters as well.

Related Tools