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 mrabarnett
Recipients Jason.Stumpf, dbenbenn, ezio.melotti, janzert, mrabarnett, serhiy.storchaka
Date 2013-09-20.00:00:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379635251.7.0.53924115397.issue19055@psf.upfronthosting.co.za>
In-reply-to
Content
The behaviour is correct.

Here's a summary of what's happening:-


First iteration of the repeated group:

    Try the first branch. Can match "a".

Second iteration of the repeated group:

    Try the first branch. Can't match "a".
    Try the second branch. Can't match "ab".

Continue with the remainder of the pattern.

Can't match "c", therefore backtrack to the first iteration of the repeated group:

    Try the second branch. Can match "ab".

Second iteration of the repeated group:

    Try the first branch. Can match "a".

Third iteration of the repeated group:

    Try the first branch. Can't match "a".
    Try the second branch. Can't match "ab".

Continue with the remainder of the pattern.

Can match "c".

Reached the end of the pattern. It has matched "abac".
History
Date User Action Args
2013-09-20 00:00:51mrabarnettsetrecipients: + mrabarnett, dbenbenn, ezio.melotti, serhiy.storchaka, janzert, Jason.Stumpf
2013-09-20 00:00:51mrabarnettsetmessageid: <1379635251.7.0.53924115397.issue19055@psf.upfronthosting.co.za>
2013-09-20 00:00:51mrabarnettlinkissue19055 messages
2013-09-20 00:00:51mrabarnettcreate