[Htmlparser-user] n lines before/after searchstring
Brought to you by:
derrickoswald
From: quanta v. <qua...@ya...> - 2006-02-04 00:39:45
|
Hi, Can HTMLParser allow one to extract into an array lines before or after a search string? For instance: <CENTER> <TABLE ALIGN="CENTER" BORDER=5> <TR> <TD width=150 align=center><B>Area</B></TD> <TD width=120 align=center><B>Instantaneous Load</B></TD> </TR> <TR> <TD>PJM MID ATLANTIC REGION</TD> <TD align=right>33929</TD> </TR> <TR> <TD>PJM WESTERN REGION</TD> <TD align=right>39400</TD> </TR> <TR> <TD>PJM SOUTHERN REGION</TD> <TD align=right>9857</TD> </TR> <TR> <TD>PJM RTO</TD> <TD align=right>83186</TD> </TR> </TABLE> </CENTER> <P><CENTER>Loads are calculated from raw telemetry data and are approximate.</CENTER> <CENTER>The displayed values are NOT official PJM Loads.</CENTER> <BR><BR><BR> <P><CENTER><H2>Current PJM Transmission Limits</H2></CENTER> <P align=center>None </BODY> </HTML> In the following URL I matched the string "Current PJM Transmission Limits" and I want to obtain any and all lines after this match...or even the next 3 lines, etc., Any help would be appreciated! Thanks, --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! |