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 Matthew.Boehm
Recipients EungJun.Yi, Matthew.Boehm, ezio.melotti, mrabarnett, pitrou, skrah
Date 2011-05-28.19:43:55
SpamBayes Score 1.6890793e-07
Marked as misclassified No
Message-id <1306611836.28.0.0725696673474.issue12177@psf.upfronthosting.co.za>
In-reply-to
Content
Here are some windows results with Python 2.7:

>>> import re
>>> re.match("()*?1", "1")
<_sre.SRE_Match object at 0x025C0E60>
>>> re.match("()+?1", "1")
>>> re.match("()+?1", "11")
<_sre.SRE_Match object at 0x025C0E60>
>>> re.match("()*?1", "11")
<_sre.SRE_Match object at 0x025C3C60>
<_sre.SRE_Match object at 0x025C3C60>
>>> re.match("()*?1", "a1")

Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
    re.match("()*?1", "a1")
  File "C:\Python27\lib\re.py", line 137, in match
    return _compile(pattern, flags).match(string)
MemoryError
>>> re.match("()+?1", "a1")

Traceback (most recent call last):
  File "<pyshell#13>", line 1, in <module>
    re.match("()+?1", "a1")
  File "C:\Python27\lib\re.py", line 137, in match
    return _compile(pattern, flags).match(string)
MemoryError

Note that when matching to a string starting with "1", the matcher will not throw a MemoryError.
History
Date User Action Args
2011-05-28 19:43:56Matthew.Boehmsetrecipients: + Matthew.Boehm, pitrou, ezio.melotti, mrabarnett, skrah, EungJun.Yi
2011-05-28 19:43:56Matthew.Boehmsetmessageid: <1306611836.28.0.0725696673474.issue12177@psf.upfronthosting.co.za>
2011-05-28 19:43:55Matthew.Boehmlinkissue12177 messages
2011-05-28 19:43:55Matthew.Boehmcreate