Parsing HTML Tables



my( @tableRows, @tableDefRows);
$htmlContent = s/\n//g; # $htmlContent Contains the below sample
<table><tbody> <tr align="center><td align="center">4321191</td>
<td align="center"><a target="_blank"
href="http://mail.yahoo.com/config/login?/pls/bug/webbug_util.show_bug_user?
p_userid=YHIRA">YHIRA</a></td>
<td align="center">Bug 432119 - WHEN CREATING DATABASE</td>
<td align="center">11 - Code Bug (Response/Resolution)</td>
<td align="center"><a target="_blank"
href="http://mail.yahoo.com/config/login?/pls/bug/webbug_util.show_bug_user?
p_userid=SIHL">SIHL</a> </td>
<td align="center">Medium</td></tr><tr>.........</tr></tbody></table>

@tableRows = ($htmlContent =~ /(<tr.*?>*.?>YHIRA<.*?<\/tr>)?/isg );
for ( @tableRows ) { @tableDefRows = ($_ =~
/(<td.*?>*.?4321191*.?<\/td)?/isg );
}

Refering to the code above. Why doesn't $tableRows[0] match the data between
<tr*>..>YHIRA<..</tr>?It matches all the data between
<TABLE><TBODY>...</TBODY>
and second @tableDefRows match the data between <TD*>..4321191..</TD>It
matches all the data between <TABLE><TOBDY><TR*>...</TR></TBODY></TABLE>
something is wrong here. Do I need to some how start from <TABLE> and my
match all the way tofirst </td> and use some backtracking or something?

thanks much.



.



Relevant Pages

  • Re: pc has virus and virus scan cant complete task
    ... If your refering to hd checking utility, they are usually available from the ... > Suggest you also visit hd manu.site and download their hd checking ... Jeffrey Needle ... Prev by Date: ...
    (microsoft.public.windowsxp.basics)
  • Re: outlook xp AND outlook 2003
    ... ps....do you really think I'd post all this stuff in the manner I did if I ... Refering to the product as XP rather than a 2002 was a pretty harmless ... Sorry to have disturbed you and your apparant need for pedantic accuracy. ... Prev by Date: ...
    (microsoft.public.outlook)
  • Blocking Unwanted Parasites with a Hosts File
    ... I'm refering to ... I'm using this file and appriciate it. ... How do I edit my Host file to cancell this stop's? ... Prev by Date: ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Win Xp Intel Usb Controller
    ... I have the same problem only I don't even see anything refering to USB in ... Steve ... Prev by Date: ...
    (microsoft.public.windowsxp.device_driver.dev)
  • Re: Hmm.
    ... Sorry bout that, I think I was refering to another thread, but ... misposted it, maybe the sewer thread or such like, oops!! ... Prev by Date: ...
    (uk.rec.subterranea)