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 EungJun.Yi
Recipients EungJun.Yi
Date 2011-05-25.18:04:24
SpamBayes Score 1.1407036e-10
Marked as misclassified No
Message-id <1306346665.06.0.86860516028.issue12177@psf.upfronthosting.co.za>
In-reply-to
Content
re.match raises MemoryError when trying to match r'()+?1' to 'a1', as shown below.

~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.match(r'()+?1', 'a1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
MemoryError
>>>

~$ python3
Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.match(r'()+?1', 'a1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/re.py", line 153, in match
    return _compile(pattern, flags).match(string)
MemoryError
>>>
History
Date User Action Args
2011-05-25 18:04:25EungJun.Yisetrecipients: + EungJun.Yi
2011-05-25 18:04:25EungJun.Yisetmessageid: <1306346665.06.0.86860516028.issue12177@psf.upfronthosting.co.za>
2011-05-25 18:04:24EungJun.Yilinkissue12177 messages
2011-05-25 18:04:24EungJun.Yicreate