Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I tried doing a search on a row with a <td align=left ... bgcolor=#04047c... and ending it with </td>, but it doesnt want to work. Here is the code I used<td align="left" valign="top" bgcolor="#04047c"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="# +04047c" width="116"> <!--#include virtual="/bus_nav_all_graphic.ssi"--> </table> <p> </p> </td>
#grabbing and deleting the left nav if (/<td align="left valign="top" bgcolor="#04047c.*?>/i ... / +<\/td.*?>/i){ # this is the line that starts the left nav # extract everything between the open and close td and delete + it $leftnav_temp = $_; $leftnav_temp =~ s/(.*?)\<td align="left valign="top" bgcolor +="#04047c\>(.*?)\<\/td\>/$2/i; chomp($leftnav_temp); $leftnav = "$leftnav_temp" ; $leftnav = ""; # Write the title to the output file print OUTFILE $title . "\n"; next }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Enough! (was Re: deleting content)
by chromatic (Archbishop) on May 02, 2001 at 23:27 UTC | |
|
Re: deleting content
by AidanLee (Chaplain) on May 02, 2001 at 22:53 UTC |