12 views

Write character classes for the following sets of characters:

1. The first ten letters (up to "j" ) in either upper or lower case.
2. The lowercase consonants.
3. The "digits" in a hexadecimal number (choose either upper or lower case for the "digits" above 9).
4. The characters that can appear at the end of a legitimate English sentence (e.g., exclamation point).

The following exercises, up to and including Exercise $3.3.10$, discuss the extended regular-expression notation from Lex (the lexical-analyzer generator that we shall discuss extensively in Section $3.5)$. The extended notation is listed in Fig.$3.8$.

edited | 12 views