Thanks for the answer. I will give a try to pypy regex.
On Fri, Sep 30, 2011 at 4:56 PM, Vlastimil Brom
wrote:
> 2011/9/30 Ovidiu Deac :
>> This is only part of a regex taken from an old perl application which
>> we are trying to understand/port to our new Python implementation.
>>
>> The origina
2011/9/30 Ovidiu Deac :
> This is only part of a regex taken from an old perl application which
> we are trying to understand/port to our new Python implementation.
>
> The original regex was considerably more complex and it didn't compile
> in python so I removed all the parts I could in order to
On 30/09/11 11:10:48, Ovidiu Deac wrote:
I have the following regexp which fails to compile. Can somebody explain why?
re.compile(r"""^(?: [^y]* )*""", re.X)
[...]
sre_constants.error: nothing to repeat
Is this a bug or a feature?
A feature: the message explains why this pattern is not all
Ovidiu Deac wrote:
re.compile(r"""^(?: [^y]* )*""", re.X)
> Traceback (most recent call last):
> File "", line 1, in
> 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,
This is only part of a regex taken from an old perl application which
we are trying to understand/port to our new Python implementation.
The original regex was considerably more complex and it didn't compile
in python so I removed all the parts I could in order to isolate the
problem such that I c
On Fri, Sep 30, 2011 at 7:26 PM, Ovidiu Deac wrote:
> $ python --version
> Python 2.6.6
Ah, I think I was misinterpreting the traceback. You do actually have
a useful message there; it's the same error that my Py3.2 produced:
sre_constants.error: nothing to repeat
I'm not sure what your regex i
$ python --version
Python 2.6.6
On Fri, Sep 30, 2011 at 12:18 PM, Chris Angelico wrote:
> On Fri, Sep 30, 2011 at 7:10 PM, Ovidiu Deac wrote:
>> I have the following regexp which fails to compile. Can somebody explain why?
>>
> re.compile(r"""^(?: [^y]* )*""", re.X)
>> Traceback (most recen
On Fri, Sep 30, 2011 at 7:10 PM, Ovidiu Deac wrote:
> I have the following regexp which fails to compile. Can somebody explain why?
>
re.compile(r"""^(?: [^y]* )*""", re.X)
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/lib/python2.6/re.py", line 190, in compile
>
I have the following regexp which fails to compile. Can somebody explain why?
>>> re.compile(r"""^(?: [^y]* )*""", re.X)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.6/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.6/