July 2009
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Due Tuesday, July 28th, 2009 at 10:00am sharp.
Create a subdirectory named e4 in your
exercises directory in your repository and put the file ex4 (described below) in that subdirectory. Make sure your file name is exactly ex4, including capitalization.
Each line of ex4 is a separate regular expression. It should be entered as just a string, without quotation marks. Thus, the following on its own line in the file would match all ten digit base 10 numbers: \d{10} — not \\d{10}.
Your regular expressions will be read by a program, but they are not part of a program.
Here is what the two regular expressions must do:
Your regular expressions will be tested using the Java function Pattern.matches.
You will get one mark for each regular expression that works on every test case we use.