Quick Regex Cheat Sheet
Character Classes
.Any character except newline\dAny digit (0-9)\wWord character (a-z, A-Z, 0-9, _)\sWhitespace character[abc]Any character in set[^abc]Not in character set
Quantifiers
*0 or more occurrences+1 or more occurrences?0 or 1 occurrence{3}Exactly 3 occurrences{2,5}Between 2 and 5 occurrences+?Non-greedy / lazy matching
Anchors & Groups
^Start of string or line$End of string or line\bWord boundary(...)Capturing group(?:...)Non-capturing group(?=...)Positive lookahead