Regex Tester
NEW
Test and debug regular expressions with real-time matching, syntax highlighting, and common pattern library.
Test and debug regular expressions with real-time matching, syntax highlighting, and common pattern library.
Regular Expression
/
/
g
i
m
s
g: Globali: Case-insensitivem: Multilines: Dotall (. matches newline)
Test String
Matched Result
0 matches
Matches will be highlighted here...
Common Patterns
Email
URL
Phone (US)
IP Address
Hex Color
Date (YYYY-MM-DD)
Credit Card
Username
Password Strong
HTML Tag
Regex Cheat Sheet
Character Classes
.
Any character except newline\d
Digit (0-9)\D
Non-digit\w
Word character (a-z, A-Z, 0-9, _)\W
Non-word character\s
Whitespace\S
Non-whitespaceAnchors
^
Start of string/line$
End of string/line\b
Word boundary\B
Non-word boundaryQuantifiers
*
Zero or more+
One or more?
Zero or one{n}
Exactly n{n,}
n or more{n,m}
Between n and mGroups & Lookaround
(abc)
Capture group(?:abc)
Non-capture group(?=abc)
Positive lookahead(?!abc)
Negative lookahead(?<=abc)
Positive lookbehind(?<!abc)
Negative lookbehind