New submission from EungJun Yi <semtlen...@gmail.com>: 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 >>> ---------- components: Regular Expressions messages: 136880 nosy: EungJun.Yi priority: normal severity: normal status: open title: re.match raises MemoryError type: resource usage versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12177> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com