1. Modifier
. Any character
* matches * the preceding 0 or more characters
matches the preceding one or more characters
? matches ? the preceding 0 or 1 character
^ is preceded by the character after ^
$ ends by the character before $
[] matches a character within []
() grouping, you can use 1 2 to extract
[^] matches ^ Characters other than the ones after
{n} There are n characters before {n}, n is a positive number
{n,} {n,} There are at least n characters before it, n is a positive number
{n,m} There are n~m characters before {n,m}, n,m is a positive number
2. Characters
d a number
D a non-number
w a letter or number
W a non-letter and non-number
s a whitespace character
S a non-whitespace character
b word boundary
B non-word boundary
3. Non-greedy matching
? *? ??