| . | Any character except newline | . → a, 1, @ |
| \d | Any digit (0–9) | \d+ → 123 |
| \w | Word character (letters, digits, _) | \w+ → hello_world |
| \s | Whitespace (space, tab, newline) | \s+ → spaces |
| ^ | Start of string/line | ^Hello → "Hello world" |
| $ | End of string/line | world$ → "Hello world" |
| \b | Word boundary | \bcat\b → cat (not "catch") |
| [abc] | Character class — a, b, or c | [aeiou] → vowels |
| [^abc] | Negated class — not a, b, or c | [^0-9] → non-digits |
| (abc) | Capture group | (\d+) → captures digits |
| a|b | Alternation — a or b | cat|dog → matches either |
| a* | Zero or more of a | go* → g, go, goo |
| a+ | One or more of a | go+ → go, goo (not g) |
| a? | Zero or one of a | colou?r → color or colour |
| a{3} | Exactly 3 of a | \d{4} → 2024 |
| a{2,4} | Between 2 and 4 of a | \d{2,4} → 12, 123, 1234 |