←back to thread

698 points jgrahamc | 1 comments | | HN request time: 0.351s | source
Show context
aalleavitch ◴[] No.20423095[source]
I’d like to imagine that as long as we live, poorly written regular expressions will continue to be the cause of breaking issues.
replies(2): >>20423929 #>>20424108 #
lmkg ◴[] No.20423929[source]
StackOverflow also had an outage a few years ago that was caused by exponential blow-up of a backtracking regular expression.

https://stackstatus.net/post/147710624694/outage-postmortem-...

replies(1): >>20424559 #
isaacg ◴[] No.20424559[source]
That blow up is quadratic, not exponential: "This is not classic catastrophic backtracking (talk on backtracking) (performance is O(n²), not exponential, in length), but it was enough."
replies(1): >>20427198 #
1. perlgeek ◴[] No.20427198[source]
Some years ago I tried to create an exponential time regex in Perl, and only managed a quadratic time one after a bit of experimenting.

But, as you said, quadratic is often already fatal on realistic data.