Regex Tester & Analyzer

Build, test, and debug regular expressions in real-time

Pattern
/ /
Test Text
0 characters 0 lines
Matches
0 matches

Enter a pattern and text to see matches

Live Preview
Your text will appear here with highlighted matches

Anchors

^Start of string
$End of string
\bWord boundary
\BNon-word boundary

Character Classes

.Any character
\dDigit [0-9]
\wWord [a-zA-Z0-9_]
\sWhitespace
\DNon-digit
\WNon-word
\SNon-whitespace

Quantifiers

*0 or more
+1 or more
?0 or 1
{n}Exactly n
{n,}n or more
{n,m}Between n and m

Groups & Lookarounds

(...)Capturing group
(?:...)Non-capturing
(?=...)Positive lookahead
(?!...)Negative lookahead
(?<=...)Positive lookbehind
(?Negative lookbehind

Special Characters

\nNew line
\tTab
\rCarriage return
\vVertical tab
\fForm feed
\0Null character

Flags

gGlobal search
iCase insensitive
mMultiline
sDot matches all
uUnicode
ySticky

Common Patterns Library

Click any pattern to load it into the tester