Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Stripping HTML tags efficiently

by Crian (Chaplain)
on Dec 10, 2004 at 11:18 UTC ( #413806=note: print w/replies, xml ) Need Help??

in reply to Stripping HTML tags efficiently

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.)

Replies are listed 'Best First'.
Re^2: Stripping HTML tags efficiently
by agynr (Acolyte) on Dec 10, 2004 at 12:08 UTC
    You are also right.. Thanx for that

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://413806]
[gnosti]: Corion: Thanks. Going to seconds, then back to H:M:S using strftime looks good.
[gnosti]: True, it's easy to go both ways ;-)
[marioroy]: kcott found the link.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-08-18 09:10 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (297 votes). Check out past polls.