Message119125
I'm not sure this is valid. First, I think I have a much easier example:
>>> import re
>>> re.search('bc|abc', 'abc').group()
'abc'
I assume you'd expect this to give 'bc' as well. However, for a string s, "search" looks for matches looking at s, then looking at s[1:], then s[2:], and so on. For s, it looks at both branches, and the second branch matches.
This can be inferred from the docs of "search": """Scan through string looking for a location where the regular expression pattern produces a match;""", for the first location a match is produced for the second branch. |
|
Date |
User |
Action |
Args |
2010-10-19 07:33:26 | georg.brandl | set | recipients:
+ georg.brandl, tzot |
2010-10-19 07:33:26 | georg.brandl | set | messageid: <1287473606.82.0.778728172353.issue10139@psf.upfronthosting.co.za> |
2010-10-19 07:33:24 | georg.brandl | link | issue10139 messages |
2010-10-19 07:33:24 | georg.brandl | create | |
|