| For the mathematician and linquistist |
| ε |
the empty string |
| x |
the symbol x |
| α β |
The RE α followed by the RE β |
| α | β |
Either α or β |
| α* |
Zero or more sequences of α |
| (α) |
α grouped |
| Examples include |
| (0|1)*0 |
All even binary numbers |
| 1*01*0(0|1)* |
All binary numbers containing at least two 0's |
| (0|1)*111(0|1)* |
All binary numbers that contain the sequence "111" somewhere in the number |
| For the Unix guru using grep, ed, sed, ... |
| x |
Matches the non-special character.
The characters '?', '\',
'.', '[', ']', '^',
'$', '*', '(', and ')'.
are special
|
| [aeiou] |
Matches characters inside the brackets. |
| [0-9A-F] |
Matches a range of characters. |
| . |
Matches any character |
| PATTERN* |
Matches a PATTERN occuring zero or more times. |
| PATTERN+ |
Matches a PATTERN occuring one or more times. |
| PATTERN? |
Matches a PATTERN occuring zero or one time. |
| For the Perl programmer |