π Regex Cheat Sheet & Tester
π Regex Cheat Sheet & Tester
Complete regex reference with live testing. Pattern syntax, flags, character classes, quantifiers, and groups β all in one place.
/
/
Character Classes
. β Any character
\d β Digit [0-9]
\w β Word char [a-zA-Z0-9_]
\s β Whitespace
[abc] β 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
{3} β Exactly 3
{3,} β 3 or more
{3,6} β Between 3 and 6
Anchors & Groups
^ β Start of string
$ β End of string
(...) β Capture group
(?:...) β Non-capture
(?=...) β Lookahead
\1 β Backreference
Flags
g β Global (all matches)
i β Case insensitive
m β Multiline
s β Dot matches newline
u β Unicode