New submission from J.B. Langston :
The following code will cause Python's regex engine to hang apparently
indefinitely:
import re
message = "Flushed to
[BigTableReader(path='/data/cassandra/data/log/logEntry_202202-e68971800b2711ecaf770d5fa3f5ae87/md-112-big-Data.db&
J.B. Langston added the comment:
Yes, it is supposed to match everything up to the closing ] in this substring:
[BigTableReader(path='/data/cassandra/data/log/logEntry_202202-e68971800b2711ecaf770d5fa3f5ae87/md-112-big-Data.db')]
Quoting from the re docs:
To match a literal
J.B. Langston added the comment:
Sorry, on rereading your message I guess you were referring to the extra +, not
the [^]]. The extra + after the ) was not intentional, and after removing it,
the regex no longer hangs.
I still think it would be nice to have a timeout setting on the regex so