📚
Regex Cheat Sheet
Regular expression reference
Character Classes
.Any character except newline
\dDigit (0-9)
\DNot a digit
\wWord character (a-z, A-Z, 0-9, _)
\WNot a word character
\sWhitespace
\SNot whitespace
Anchors
^Start of string
$End of string
\bWord boundary
\BNot a word boundary
Quantifiers
*Zero or more
+One or more
?Zero or one
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times
Groups
()Capturing group
(?:)Non-capturing group
(?=)Positive lookahead
(?!)Negative lookahead
Flags
gGlobal (find all matches)
iCase insensitive
mMultiline
sDot matches newline
What is Regex Cheat Sheet?
Quick reference for regular expression patterns, quantifiers, anchors, groups, and flags.
Frequently Asked Questions
Is this tool free to use?
Yes, Regex Cheat Sheet is completely free. No registration required.
Is my data secure?
All processing happens in your browser. Your data never leaves your device.