regex
Notes on regular expressions.
Structure:
/expression/flag
i | case insensitive |
g | global |
m | multiline |
^ | string start |
$ | string end |
\A | string start (multiline) |
\Z | string end (multiline) |
{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 |
. | any character except \n and \r |
\w | any word character |
\W | any non-word character |
\d | any digit character |
\D | any non-digit character |
\s | any whitespace character |
\S | any non-whitespace character |