| . | Any character (except newline) |
| \d | Digit [0-9] |
| \D | Non-digit |
| \w | Word char [A-Za-z0-9_] |
| \W | Non-word char |
| \s | Whitespace |
| \S | Non-whitespace |
| \b | Word boundary |
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 |
| {n} | Exactly n |
| {n,} | n or more |
| {n,m} | Between n and m |
| *? | Lazy (non-greedy) |
| (abc) | Capture group |
| (?<name>abc) | Named capture group |
| (?:abc) | Non-capturing group |
| a|b | Alternation |
| ^ | Start of string/line |
| $ | End of string/line |
| (?=abc) | Positive lookahead |
| (?!abc) | Negative lookahead |
| [abc] | Any of a, b, or c |
| [^abc] | Not a, b, or c |
| [a-z] | Range a to z |
| [A-Z] | Range A to Z |
| [0-9] | Range 0 to 9 |
| \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b | |
| https?://[^\s]+ | URL |
| \b\d{1,3}(\.\d{1,3}){3}\b | IPv4 |
| #?[0-9a-fA-F]{6}\b | Hex color |
| g | Global (find all matches) |
| i | Case-insensitive |
| m | Multiline (^ $ match lines) |
| s | DotAll (. matches \n) |
| u | Unicode |