[Python-ideas] Proposed convenience functions for re module
Jan Kaliszewski
zuo at chopin.edu.pl
Thu Jul 23 00:14:20 CEST 2009
Jan Kaliszewski <zuo at 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 at chopin.edu.pl>
More information about the Python-ideas
mailing list