[
ab]
$ - matches a line containing one a or one b
[
ab]
c) - matches 'ac' or 'bc'
[
ab]
c)|b - matches 'ac', 'bc' or 'b'
[
0-9]
- matches any single numeral
[
a-z]
- matches a single lower case alphal character
[
a-zA-Z]
- matches any single alphabetical character
Always remember that, if you are in doubt of the ordering in which the regular expression is evaluated,insert brackets.