The (or one) problem is, that you have a variable in your regular expression, what is not neccessary in this case. This slows things always down.
Whats about using qr// to compile the expression or just putting the pattern into the RE directly?
while ($target_data=~m/(<[^>]{1,300}>)/gi)(You don't have to escape < and > btw.)
In reply to Re: Stripping HTML tags efficiently
by Crian
in thread Stripping HTML tags efficiently
by agynr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |