Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Regular Expression: I need a regex to fetch data from an html file

by bitingduck (Chaplain)
on Feb 27, 2012 at 16:26 UTC ( [id://956475]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regular Expression: I need a regex to fetch data from an html file
in thread Regular Expression: I need a regex to fetch data from an html file

There are a lot of nice modules in CPAN that will do your extraction in a more robust way-- i.e. they won't break if the maker of the table makes small changes in the text.

Some places to start:
HTML::TableExtract
HTML::TreeParser
HTML::TokeParser

Unless you're trying to do something really out there (and maybe even then), someone has probably already solved more than half of your problem and posted a module that does it reliably.

  • Comment on Re^3: Regular Expression: I need a regex to fetch data from an html file

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found