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 doko
Recipients
Date 2007-01-12.10:45:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
[forwarded from http://bugs.debian.org/289603]

Trying to match 1-4 lines of arbitrary content (as part of a larger regex) using the expression (.*$){1,4} and re.MULTILINE.  This caused the re module to raise the error "nothing to repeat".

$ python2.5
Python 2.5 (release25-maint, Dec 13 2006, 16:21:45) 
[GCC 4.1.2 20061212 (prerelease) (Ubuntu 4.1.1-21ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile("(.*$){1,4}", re.MULTILINE)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/re.py", line 180, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.5/re.py", line 233, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat
History
Date User Action Args
2008-01-20 09:59:10adminlinkissue1633953 messages
2008-01-20 09:59:10admincreate