Pathological regular expression

Aaron Brady castironpi at gmail.com
Sat Apr 11 14:22:06 EDT 2009


On Apr 11, 12:40 pm, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> wrote:
> 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.

While beyond the limits of a long lunch, that would make a nice
vacation?



More information about the Python-list mailing list