|Don't ask to ask, just ask|
Parsing HTML files to recover data...by UrbanHick (Sexton)
|on Nov 21, 2006 at 17:39 UTC||Need Help??|
UrbanHick has asked for the
wisdom of the Perl Monks concerning the following question:
I have another task here at the office that looks like a good chance to expand my limited Perl skills some more. Basically, thru a sad series of events we lost one of our servers and all the files on it. These files included a listing of jobs by number, pay rate, number of positions, ect.
Well, with the original files is now gone, all we have left is the HTML website descriptions of these jobs from two years ago. I am planning on using something like the LWP module to import the html file then parse it using the html code in the actual file to identify the stings I want to extract. Since the html file was generated from the original database file, it has a very regular form. A block of it might look something like this:
What I am worried about is that I have a list of jobserial numbers here from the accounting department and my boss basically wants me to recover all of the Job description text, without grabbing the other two bits of text inside of the second and third sets of blockquote tags.
My question to you all is can this be done with a fancy regex or is there a module on Cpan that I missed that does this already? If so could you kindly point me in the right direction?
Thank you very much,-UH