Regular expressions in-class exercise based on XKCD cartoon
File detective.py
is the skeleton code. It reads lines of
text from clues.txt
and prints any part of a line that
matches CLUE_PATTERN
. The initial clue pattern just
matches integers.
-
Part 1: Modify
CLUE_PATTERN
to match email addresses -
Part 2: Modify
CLUE_PATTERN
to match street addresses. This is harder.