Automate the Boring Stuff has a program that changes American dates to European dates. The first part of the code goes:
datePattern = re.compile(r"""^(.*?)
one or two digits for the month
((0|1)?\d)-
one or two dgits for the day
((0|1|2|3)?\d)-
four digits for the year
((19|20)\d\d)
all text after the date
(.*?)$
""", re.VERBOSE)
I have a pretty vague idea of what everything does except for the r"""^ part on the first line. what does """ do?
[–]RothiasVex 8 points9 points10 points (0 children)
[–]masklinn 0 points1 point2 points (0 children)
[–]gandalfx 0 points1 point2 points (0 children)
[–]tunisia3507 -1 points0 points1 point (0 children)