5 ms·
If I worked at Facebook and was evil, I'd put some text in that span that caused catastrophic backtracking :)
by testplzignore 8y ago
If I worked at Facebook and was evil, I'd put some text in that span that caused catastrophic backtracking :)
- majewsky 8y agoRegexes can be evaluated in linear time, so you'd have to send gigabytes worth of text to cause any noticeable slowdown.
- MapleWalnut 8y agoI believe with lookahead/behind a regex is technically not "regular" anymore, so you can definitely DoS a regex without GB worth of text.
- saagarjha 8y agoSure, but that regex doesn't have lookahead/lookbehind?