foo.bar at freesurf.ch.invalid
Tue Oct 5 19:58:03 CEST 2004
Gustavo Niemeyer <niemeyer at conectiva.com> writes:
> That's not the same regular expression. You must escape whitespaces
> when using re.VERBOSE.
As far as I can see, I did, except in character classes, and quoting
from the 're' manual:
] This flag allows you to write regular expressions that look
] nicer. Whitespace within the pattern is ignored, except when in a
] character class or preceded by an unescaped backslash [...]
> The problem is not just the number of repeating qualifiers, but
> the nesting of them. Nesting repeating qualifiers deeply is a good
> way to kill regular expression engines.
I actually tried the example stated in 'man perlre', translated to
>>> import re
Traceback (most recent call last):
File "<stdin>", line 1, in ?
RuntimeError: maximum recursion limit exceeded
but apparently there are ways to nest the backtracking without hitting
If you want to reply by mail, substitute my first and last name for
'foo' and 'bar', respectively, and remove '.invalid'.
More information about the Python-list