regex

Notes on regular expressions.

Structure:

/expression/flag
flags
icase insensitive
gglobal
mmultiline
anchors
^string start
$string end
\Astring start (multiline)
\Zstring end (multiline)
quantifiers
{n}n times
{n,}at least n times
{m,n}between m and n times
?zero or one time
+one or more times
*zero, one, or more times
meta sequences
.any character except \n and \r
\wany word character
\Wany non-word character
\dany digit character
\Dany non-digit character
\sany whitespace character
\Sany non-whitespace character