Inside the bracket expressions, you can specify any combination of characters (including spe- cial characters), character ranges (for example, [0-9a-z]), and character classes (for example, [[:digit:]]). A leading ^ negates the whole expression, so the whole bracket expression means “any character except ...”. Table 14.4 lists the possible character classes of regular expressions. Note that the basic classes correspond to the convenience functions for character classifications in Sec- tion 16.4.4, page 895. However, the one-letter shortcuts are supported only by regular expressions. The character class escape sequences are supported only by the ECMAScript grammar.
Here are some examples: