
July 23, 2009
12:14 a.m.
Jan Kaliszewski <zuo@chopin.edu.pl> wrote:
It sounds nice. But why not to use simply:
m = re.match(s, '|'.join(pattern1, pattern2, pattern3, pattern4))
Sorry, I ment of course: m = re.match('|'.join(pattern1, pattern2, pattern3, pattern4), s) ***
"""Do a re.match on string using pattern, returning dict containing groups which could be got by index or by name."""
I ment: "...returning collections.DefaultDict..." (as you can see in the code following). Regards, *j -- Jan Kaliszewski <zuo@chopin.edu.pl>