Pathological regular expression
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sat Apr 11 13:40:33 EDT 2009
On Sat, 11 Apr 2009 08:40:03 -0700, John Machin wrote:
>> To my mind, this is a bug in the RE engine. Is there any reason to not
>> treat it as a bug?
>
> IMHO it's not a bug -- s/hang/takes a long time to compute/
>
> Just look at it: 2 + operators and 3 * operators ... It's one of those
> "come back after lunch" REs.
Well, it's been running now for about two and a half hours, that's a
rather long lunch. And despite MRAB's assertion, it *cannot* be
interrupted by ctrl-C. That means that to all intents and purposes, the
interpreter has locked up for the duration of the calculation, which may
be days or weeks for all I know.
--
Steven
More information about the Python-list
mailing list