← All Tools
Regex Tester & Debugger
g
i
m
s
u
The quick brown fox jumps over the lazy dog. Email: user@example.com, Phone: 555-123-4567
Matches
Replace
Explain
Library
Cheatsheet
History
Highlighted Matches
Match List
Replacement String
Result
Enter a regex pattern to see explanation.
Common Patterns
Character Classes
.
Any character (except newline)
\d
Digit [0-9]
\D
Not a digit
\w
Word char [A-Za-z0-9_]
\W
Not a word char
\s
Whitespace
\S
Not whitespace
[abc]
Any of a, b, or c
[^abc]
Not a, b, or c
[a-z]
Range a to z
Quantifiers
*
0 or more
+
1 or more
?
0 or 1
{n}
Exactly n
{n,}
n or more
{n,m}
Between n and m
*?
0 or more (lazy)
+?
1 or more (lazy)
Anchors
^
Start of string/line
$
End of string/line
\b
Word boundary
\B
Not a word boundary
Groups & Lookaround
(abc)
Capturing group
(?:abc)
Non-capturing group
(?<name>abc)
Named group
\1
Backreference to group 1
(?=abc)
Positive lookahead
(?!abc)
Negative lookahead
(?<=abc)
Positive lookbehind
(?<!abc)
Negative lookbehind
a|b
Alternation (a or b)
Recent Patterns