A Recursive Definition for Regular Expressions
A regular expression for an alphabet ? is a certain kind of pattern that describes a set of strings over ?.
Any character c in ? is a regular expression representing {c}
If E, E1 and E2 are regular expressions over ? then so are
E1 E2 -- representing the set concatenation of E1 and E2.
E1 | E2 -- representing alternation of E1 and E2.
( E ) -- representing E grouped with parentheses.
E+ -- rep. one or more instances of E concatenated.
E* -- zero or more instances of E