Regex Tester

/ /
Matches 0
No matches
Quick Reference

Characters

.
Any character (except newline)
\d
Digit [0-9]
\w
Word char [a-zA-Z0-9_]
\s
Whitespace
\b
Word boundary

Quantifiers

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

Groups & Lookaround

(…)
Capture group
(?:…)
Non-capturing group
(?<name>…)
Named group
(?=…)
Lookahead
(?!…)
Negative lookahead

Flags

g
Global (all matches)
m
Multiline (^ $ per line)
i
Case insensitive
s
Dotall (. matches \n)
u
Unicode