The first thing to start with is the smallest bits. The simplest character class is a single character, which is just included in the pattern as a literal. Frequently, we want to allow matching of a class of characters. There are also a number of named character classes that may be abbreviated, and that will be accurate for platform and national language. We compose larger expressions by a combination of grouping and by indicating repetition .
Repetition is indicated by one of several operators.
It must contain zero or more letters in the range d-w . The first digit character class has no repitition operator, so it simply occurs once. Overall, it amounts to either one or two digits. But once they are mastered, a great deal of expressive power is obtained. Resources Friedl, Jeffrey E. F., Mastering Regular Expressions , O'Reilly, Cambridge, MA 1997 is a fairly standard and definitive reference on RegEx's.