Week 14: Exercises

1. Vowel Words

Write a program that finds all words in the input that begin with a vowel A, E, I, O, or U (which may be in uppercase or lowercase in the text). Write all these words in sorted order to standard output, with no duplicates. Use a regular expression for matching words.

2. Time Expression

Write a regular expression that will match any day/time in this format:

Feb 2 2024 10:08:24

A month will always be written with the first letter capitalized and the remaining letters in lowercase. The year and seconds are optional, so e.g. the following day/time is also valid:

Feb 2 10:08