Pathological regular expression

MRAB google at
Sat Apr 11 18:27:17 CEST 2009

Dotan Cohen wrote:
>> IMHO it's not a bug -- s/hang/takes a long time to compute/
> ‎That is quite what a hang is, and why the timeout was invented. The
> real bug is that there is no timeout mechanism.
I wouldn't call it a "hang" because it is actually doing work. If it was
'stuck' on a certain part of the text and not progressing then it would
be a hang.

>> Just look at it: 2 + operators and 3 * operators ... It's one of those
>> "come back after lunch" REs.
> Some users would not be able to tell that from the beginning. While a
> timeout override would be necessary in these cases, a timeout should
> be set.

More information about the Python-list mailing list