Identifiers are the basis of regular expressions. These define the characters that must be present (or absent) to match the regular expression.
|
regex
|
Description
|
Example
|
|
A character |
The regular expression must match this letter. |
A will match the letter A |
|
. |
This matches any one character. |
"Hack." matches Hack1, Hacki, but not Hack12 or Hackil; only one additional character matches |
|
[] |
This matches any one of the characters enclosed in the brackets. The enclosed characters may be a set or a range. |
coo[kl] matches cook or cool; [0-9] matches any single digit |
|
[^] |
This matches any one of the characters except those that are enclosed in square brackets. The enclosed characters may be a set or a range. |
9[^01] matches 92 and 93, but not 91 and 90; A[^0-9] matches an A followed by anything except a digit |