Pre-assessment question:
Regular expressions are useful for:
A. Analyzing timeseries data for gaps
B. Transforming data into the same format
C. Renaming files using a command line interface
D. Summing values in one column of a comma-separated text file
Practical exercise:
Write a Python program that uses a single regular expression and transforms dates of the
following format:
Dec-12-1849
01/02/80
JUL-28-87
6-25-84
3/4/1990
avr-20-96
into:
12/12/1849
1/2/1980
7/28/1987
6/25/1984
3/4/1990
Where:
Which regular expression will match the string "JUL-28-87″:
A. [a-z]+W[0-9]+W[0-9]+
B. ([a-z]+)W([0-9]+)W([0-9]+)
C. JUL-w-w
D. (d+|[a-zA-Z]+)[/-](d+)[/-](d+)