in reply to Parsing HTML files to recover data...

UrbanHick-

while I am still a newbie myself, this might help you in some way or other:

while ($page=~ /<blockquote>(.*?)<\/blockquote>/g) { print "captured text: $1\n"; }

I think this will at least get you started down the right road with regexs. However I would suggest that you listen to the silverbacks around here and go with the HTML::X modules.

good luck,

-mox

Replies are listed 'Best First'.
Re^2: Parsing HTML files to recover data...
by kaif (Friar) on Nov 22, 2006 at 12:07 UTC

    Is it just me, or should this response have been one of the first, rather than the sixth? I mean, go HTML::TableContentParser, HTML::TokeParser, HTML::TreeBuilder, Template::Extract, and all the other modules --- but seriously, as a first go ... ?

    # Assuming the page contents are in $_ ($jobname) = m|<span class="jobname">\s*(.*?)\s*</span>|s; ($jobserial) = m|<span class="jobserial">\s*\((.*?)\)\s*</span>|s; ($offices) = m|<span name="offices">\s*(.*?)\s*</span>|s; ($description) = m|<blockquote>\s*(.*?)\s*</blockquote>|s;

    Please excuse my surprise.