Character Classes
A character class is a regular expression constructed of characters enclosed in square brackets [] that matches any one character contained within it. For example, [aeiou] matches any one of the vowels listed between the brackets. Most special characters lose their special meanings within character classes. For example, find /[.,]/ -e would search for a literal period, a comma, or a space. To match a ] character in a character class, place it as the first character inside the square brackets.
Some special characters used in other regular expression implementations are not supported: \d, \D, \w, \W, \s, and \S. Instead of these, you can use character classes such as [0-9], [^0-9], [a-zA-Z0–9_], [^a-zA-Z0–9_], and so on.