📖
Regex Cheatsheet — Regular Expression Reference
Complete regular expression reference with examples for all syntax patterns.
Regex Cheatsheet
Anchors
^Start of string$End of string\bWord boundary\BNot word boundaryQuantifiers
*0 or more+1 or more?0 or 1{n}Exactly n{n,}n or more{n,m}Between n and mCharacter Classes
.Any char except newline\dDigit [0-9]\DNon-digit\wWord char [a-zA-Z0-9_]\WNon-word\sWhitespace\SNon-whitespaceGroups
(abc)Capture group(?:abc)Non-capturing group(?=abc)Lookahead(?!abc)Negative lookahead(?<=abc)Lookbehind(?<!abc)Negative lookbehindFlags
gGlobal — find all matchesiCase-insensitivemMultiline — ^ and $ match line start/endsDotall — . matches newlineuUnicode mode