| $ | End of string or end of line (in multi-line pattern) |
| ^ | Start of string or start of line (in multi-line pattern) |
| \b | Word boundary |
| \B | Not word boundary |
| x? | 0 or 1 |
| x+ | 1 or more |
| * | 0 or more |
| {2} | Exactly 2 |
| {2,} | 2 or more |
| {2,5} | Between 2 and 5 |
| . | Any single character except line break (\n, \r) |
| \w | Word character |
| \W | Non-word character |
| \d | Digit |
| \D | Non-digit character |
| \s | Whitespace character ([ \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]) |
| \S | Non-whitespace character |
| \b | Beginning/end of a word |
| \B | Not at the beginning/end of a word |
| \n | New line character | \r | Carriage return character |
| \t | Tab character |
| \v | Vertical tab character |
| \0 | NUL character |
| \f | Form feed character |
| \xxx | Character specified by an octal number xxx |
| \xdd | Character specified by an hexadecimal number dd |
| \udddd | Unicode character specified by an hexadecimal number dddd |
| [xyz] | Any character between the brackets |
| [^xyz] | Any character not between the brackets |
| [x-z] | Any character from x to z |
| [^x-z] | NOT (Any character from x to z) |
| (x|y) | Any of the alternatives specified |