The exercises of Chapter Two
2.1 Write regular expression for the following character sets, or give reasons why no regular expression can be written:
a. All strings of lowercase letters that begin and end in a. [Solution]
a[a-z]*a | a
b. All strings of lowercase letters that either begin or end in a ( or both) both: a(a|b|c|„|z)* a