| Token | Meaning | Token | Meaning | |
|---|---|---|---|---|
| [a-z] | Any lower case letter. |   | ||
| [A-Z] | Any upper case letter. |   | ||
| [^a-z] | Any non-lower case letter. |   | ||
| [^A-Z] | Any non-upper case letter. |   | ||
| \d | Any digit. Same as [0-9]. | d | Literal d. | |
| \D | Any non-digit. Same as [^0-9]. | d | Literal d. | |
| \w | Any word character. Same as [A-Za-z0-9]. | w | Literal w. | |
| \W | Any non-digit. Same as [^A-Za-z0-9]. | d | Literal W. | |
| \s | Any whitespace character. Same as [ \n\r\f\t\v]. | w | Literal s. | |
| \S | Any non-whitespace character. Same as [^ \n\r\f\t\v]. | d | Literal S. | |
| ( ) | Grouping. | \( \) | Literal ( ) | |
| | | Or | |||
| . | Any character. | \. | Literal . | |
| ? | 0 or 1 occurrences. | \? | Literal ? | |
| * | 0 or more occurrences. | \* | Literal * | |
| + | 1 or more occurrences. | \+ | Literal + | |
| {n} | Exactly n occurrences. | \{ | Literal { | |
| {n,m} | Between n and m occurrences. | \} | Literal } |