in reply to Re: Re: regex is too long
in thread regex is too long
are a lot of work to calculate. (Hit one content-type: and then you force a ton of scanning and backtracking through the whole string.)content-\w+: .* .*name\s*=\s*".*\.(exe|scr|pif|vbs)"
In fact I am going to guess that either that or another RE is really efficient. Perl's RE engine's optimizations are able to spot and fix it when they see the offending pattern in a small RE, but with a large one they give up analyzing before fixing the disaster. (It might, in fact, be that line.)
And yes, it is possible that a new release of Perl will fix it. Ilya added more sanity checks to catch even more of these and may catch a disaster he missed before. But that will be less reliable than looking through your file for .*'s, and particularly .*'s that will force a lot of backtracking to happen. (At least make sure that between any 2 .*'s there is some meaningful text.)
|
|---|