| Character | Matches |
|---|---|
| ? | Any single character. |
| * | Zero or more characters. |
| # | Any single digit (0–9). |
| [charlist] | Any single character in charlist. |
| [!charlist] | Any single character not in charlist. |
To match the special characters left bracket ([), question mark (?), number sign (#), and asterisk (*), enclose them in brackets. The right bracket (]) cannot be used within a group to match itself, but it can be used outside a group as an individual character.
Specify a range of characters in a charlist by using a hyphen (–) to separate the upper and lower bounds of the range. [A-Z], for example, results in a match if the corresponding character position in a string contains any uppercase letters in the range A–Z. You can specify multiple ranges in brackets without delimiters.