Regex Cheat Sheet Generator
Quick reference guide for common regular expression patterns.
Character Classes
\dDigit (0-9)
\DNon digit
\wWord character
\WNon word character
\sWhitespace
\SNon whitespace
.Any character except newline
Anchors
^Start of string
$End of string
\bWord boundary
\BNon word boundary
Quantifiers
*0 or more
+1 or more
?0 or 1
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times
Groups and Ranges
(abc)Capture group
(?:abc)Non capturing group
[abc]Any of a, b, or c
[^abc]Not a, b, or c
a|ba or b
Lookarounds
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
