Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: HTML Matching

by autark (Friar)
on Nov 19, 2000 at 01:08 UTC ( #42367=note: print w/replies, xml ) Need Help??


in reply to HTML Matching

A regexp will probably not do it right. Your regexp will fail on this example:

<input type="text" value=">">

Why not just use HTML::Parser ? That would be the correct way of doing it. And it is fast too, both to write and execution. Just subclass HTML::Parser, and use the text method, like this:

package MyParser; use base 'HTML::Parser'; sub text { my($self, $origtext, $is_cdata) = @_; print $origtext; }
The above code was just copied and pasted from the HTML::Parser pod file.

Autark.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://42367]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-11-26 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?