R?
Regex Syntax Cheatsheet
Local processing · no uploadsJavaScript regex syntax reference: character classes, anchors, quantifiers, etc.
JavaScript regex syntax reference: character classes, anchors, quantifiers, etc.
.Match any single char except newline
\wWord character [a-zA-Z0-9_]
\dDigit [0-9]
\sWhitespace character
\WNon-word character
\DNon-digit
\SNon-whitespace
[abc]Word character [a-zA-Z0-9_]
[a-z]Digit [0-9]
[^abc]Non-word character
^Start of string/line
$End of string/line
\bWord boundary
*0 or more times
+1 or more times
?0 or 1 time
{n}Exactly n times
{n,m}n to m times
{n,}n or more times
(...)Capturing group
(?:...)Non-capturing group
a|bOR operator
Backreference to group n
(?=...)Positive lookahead
(?!...)Negative lookahead
gGlobal search
iCase-insensitive
mMultiline mode
sdotAll mode (. matches )
\tTab character
Newline (LF)
\rCarriage return (CR)