Message1328
Logged In: YES
user_id=34892
I've run into another incarnation of this (it breaks in
Python 2.3.5 and Python 2.4.3):
>>> import sre
>>> sre.compile("(a*)?")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python24\Lib\sre.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python24\Lib\sre.py", line 227, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
Now granted that the '?' here is redundant for the '*'
quantifier on 'a', but compiling this regex works with
Python 2.3's "pre" and it works in Perl.
The actual use case I've hit here is trying to compile all
the regex's in Fedora Core 5's SELinux config files
(/etc/selinux/targeted/contexts/files/file_contexts*). The
first such regex that broke was:
'/usr/share/selinux-policy([^/]*)?/html(/.*)?'
|
|
Date |
User |
Action |
Args |
2007-08-23 13:50:29 | admin | link | issue214033 messages |
2007-08-23 13:50:29 | admin | create | |
|