Learn
Cheatsheet
Playground
🇺🇸
Anchors
^
Start of string or line
$
End of string or line
\b
Word Boundary
\B
Not Word Boundary
Flags
i
Ignore Case
g
Global
m
Multiline
Group & References
()
Group
\1
Reference
(?:)
Non Capturing Group
Character Classes
[abc]
Character Set
[^abc]
Negated Character Set
[a-z]
Range
.
Dot
\w
Word
\W
Not Word
\d
Digit
\D
Not Digit
\s
Whitespace
\S
Not Whitespace
Lookarounds
(?=)
Positive Lookahead
(?!)
Negative Lookahead
(?<=)
Positive Lookbehind
(?<!)
Negative Lookbehind
Quantifiers And Alternation
+
Plus
*
Asterisk
{1,3}
Quantifier
?
Optional
|
Alternation