O
Ovidiu Deac
I have the following regexp which fails to compile. Can somebody explain why?
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.6/re.py", line 245, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
Is this a bug or a feature?
Thanks,
Ovidiu
Traceback (most recent call last):re.compile(r"""^(?: [^y]* )*""", re.X)
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.6/re.py", line 245, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
Is this a bug or a feature?
Thanks,
Ovidiu