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 tzot
Recipients tzot
Date 2010-10-18.22:38:15
SpamBayes Score 0.024366956
Marked as misclassified No
Message-id <1287441498.46.0.0723094843025.issue10139@psf.upfronthosting.co.za>
In-reply-to
Content
For completeness' sake, I also provide the "(?:regex_n)" results:

>>> text= 'A***Z'
>>> re.compile('(?:(?<=^A).*(?=Z$))').search(text).group(0) # regex_1
'***'
>>> re.compile('(?:(?<=^A).*)').search(text).group(0) # regex_2
'***Z'
>>> re.compile('(?:.*(?=Z$))').search(text).group(0) # regex_3
'A***'
>>> re.compile('(?:(?<=^A).*(?=Z$))|(?:(?<=^A).*)').search(text).group(0) # regex_1|regex_2
'***'
>>> re.compile('(?:(?<=^A).*(?=Z$))|(?:.*(?=Z$))').search(text).group(0) # regex_1|regex_3
'A***'
>>> re.compile('(?:(?<=^A).*)|(?:.*(?=Z$))').search(text).group(0) # regex_2|regex_3
'A***'
>>> re.compile('(?:(?<=^A).*(?=Z$))|(?:(?<=^A).*)|(?:.*(?=Z$))').search(text).group(0) # regex_1|regex_2|regex_3
'A***'
History
Date User Action Args
2010-10-18 22:38:18tzotsetrecipients: + tzot
2010-10-18 22:38:18tzotsetmessageid: <1287441498.46.0.0723094843025.issue10139@psf.upfronthosting.co.za>
2010-10-18 22:38:15tzotlinkissue10139 messages
2010-10-18 22:38:15tzotcreate