| . | Any character except newline (use s flag to include newlines) |
| \d / \D | Digit / Non-digit [0-9] |
| \w / \W | Word character / Non-word [a-zA-Z0-9_] |
| \s / \S | Whitespace / Non-whitespace |
| ^ / $ | Start / End of string (or line with m flag) |
| \b / \B | Word boundary / Non-word boundary |
| [abc] | Character class — matches a, b, or c |
| [^abc] | Negated class — anything except a, b, c |
| [a-z] | Range — any lowercase letter |
| a|b | Alternation — matches a or b |
| * | Zero or more (greedy) |
| + | One or more (greedy) |
| ? | Zero or one (makes quantifier lazy when appended) |
| {n} / {n,m} | Exactly n / Between n and m repetitions |
| (abc) | Capturing group |
| (?:abc) | Non-capturing group |
| (?<name>abc) | Named capturing group |
| (?=abc) / (?!abc) | Positive / Negative lookahead |
| (?<=abc) / (?<!abc) | Positive / Negative lookbehind |