http://www.perlmonks.org?node_id=585311

UrbanHick has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks!

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:

__DATA__ <p><b><span class="jobname"> Accounting Assistant, Level 2 </span> <span class="jobserial">(19203)</span> <br /> Current members: <br /> <span name=”em”>Plow, Elliot</span> <span name=“em”>Wang, Susan</span> <br /> <span name=”offices”>Huston</span> </p> <blockquote> Job descriptions here. This block quoted text contains a job description and it what I am rea +lly looking to recover. </blockquote> <blockquote><a href="#top">Go to the top of this page</a>.</blockquote +> <blockquote><a href=”companyHR.html”>Check for open positions now!</a> +</blockquote> __END__

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