Practice Evaluation (Difficult)

You have 30 minutes to complete this evaluation.

Use the regexquiz tool to write a regular expression to match all the Java logging Levels from INFO, WARNING, and SEVERE. The format for the logger output is <level>: <message> [<time>]. Match the message and time only taking the month, day, time, and year.

Example logging message

WARNING: warning message [Tue Mar 22 13:11:31 PDT 2011]

The match should look like

0000: [(' warning message ', 'Mar', '22', '13:11:31', '2011')]

Instructions for trying the easy problem

1. Open a command window and start the regexquiz. You can use either of the following commands to start the quiz:

$ regexquiz diff

RegExQuiz! ICS 215 RegEx quizzer.
Type #question to see the quiz question. Then type in the regular
expression that solves the question. When you hit return the quizzer
will show you lines that match that regex, or nothing if nothing matches.
Type #quit to quit.

Loaded Quiz diff

Write a regular expression to match all the Java logging Levels from INFO, WARNING,
and SEVERE. The format for the logger output is <level>: <message> [<time>]. Match the message and time only taking
the month, day, time, and year.

* The <level> is the Java logging levels,

    SEVERE (highest value)
    WARNING
    INFO
    CONFIG
    FINE
    FINER
    FINEST (lowest value)

* The <message> is free text.

* The <time> is in the format

  * Three letter day of the week, followed by a space.
  * Three letter month of the year followed by a space.
  * Two digit day of the month followed by a space.
  * Two digit hour of the day, followed by a colon ':'
  * Two digit minute, followed by a colon ':'
  * Two digit second, followed by a space
  * Three letter time zone followed by a space
  * Four digit year.


Example logging message

    WARNING: warning message [Tue Mar 22 13:11:31 PDT 2011]


The match should look like

     0000: [(' warning message ', 'Mar', '22', '13:11:31', '2011')]


quiz >

2. Start entering your regular expression to match the message and time. Only taking the month, day, time, and year.

3. When you have your solution, quit regexquiz by typing “#quit” at the command prompt.

4. Find the text file with the name <username>diff.txt

This file is automatically created by regexquiz. It includes the commands that you typed in the quizzer. On my laptop the filename is carletonmoorediff.txt.

5. Email the file to Cam and Jan

Send an email with the file attached to cmoore@hawaii.edu and dufek@hawaii.edu. The timestamp on the email will indicate when you completed the quiz. For an easy quiz you have 30 minutes to complete the problem.

Watch me solving the problem

After trying out the problem you can watch me solve the problem.