Message61053
[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
|
|
Date |
User |
Action |
Args |
2008-01-20 09:59:10 | admin | link | issue1633953 messages |
2008-01-20 09:59:10 | admin | create | |
|