Regular Expressions (Regex) Cheat Sheet
A quick reference for common Regular Expression (Regex) patterns.
| Pattern | Description |
. | Any single character. |
\d | Any digit (0-9). |
\w | Any word character (alphanumeric & underscore). |
\s | Any whitespace character. |
^ | Start of the string. |
$ | End of the string. |
| Pattern | Description |
* | Zero or more occurrences. |
+ | One or more occurrences. |
? | Zero or one occurrence. |
{n} | Exactly n occurrences. |
{n,} | n or more occurrences. |
{n,m} | Between n and m occurrences. |
| Pattern | Description |
[abc] | A single character of: a, b, or c. |
[^abc] | A character that is not: a, b, or c. |
[a-z] | A character in the range: a-z. |
[a-zA-Z] | A character in the range: a-z or A-Z. |