Message198116
>>> re.match('(a|ab)*',('aba')).group(0)
'a'
According to the documentation, the * should match as many repetitions as possible. 2 are possible, it matches 1.
Reversing the order of the operands of | changes the behaviour.
>>> re.match('(ab|a)*',('aba')).group(0)
'aba' |
|
Date |
User |
Action |
Args |
2013-09-19 22:28:43 | Jason.Stumpf | set | recipients:
+ Jason.Stumpf |
2013-09-19 22:28:43 | Jason.Stumpf | set | messageid: <1379629723.54.0.556911663587.issue19055@psf.upfronthosting.co.za> |
2013-09-19 22:28:43 | Jason.Stumpf | link | issue19055 messages |
2013-09-19 22:28:43 | Jason.Stumpf | create | |
|