This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jason.Stumpf
Recipients Jason.Stumpf
Date 2013-09-19.22:28:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379629723.54.0.556911663587.issue19055@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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'
History
Date User Action Args
2013-09-19 22:28:43Jason.Stumpfsetrecipients: + Jason.Stumpf
2013-09-19 22:28:43Jason.Stumpfsetmessageid: <1379629723.54.0.556911663587.issue19055@psf.upfronthosting.co.za>
2013-09-19 22:28:43Jason.Stumpflinkissue19055 messages
2013-09-19 22:28:43Jason.Stumpfcreate