Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Extracting TD's...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 1457 of 1483
Post > Topic >>

Extracting TD's from a Text File (Regex Help).

by sara.samsara@[EMAIL PROTECTED] (Sara Samsara) Apr 8, 2008 at 05:22 PM

------=_NextPart_000_0103_01C8999D.0EC89240
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

################ TEXT FILE ##################
<td class=3D"PhorumTableRowAlt thread"  style=3D"padding-left: 0px">
       =20
            <a =
href=3D"http://mysite.com/link/here_goes?id=3D239">LINK</a>

    &nbsp;<span class=3D"PhorumNewFlag"></span></td>

 <td class=3D"PhorumTableRowAlt" nowrap=3D"nowrap" width=3D"150">
  <a href=3D"http://mysite.com/link/here_goes?id=3D239">LINK</a>
</td>
    <td class=3D"PhorumTableRowAlt PhorumSmallFont" nowrap=3D"nowrap" =
width=3D"150">06/11/2007 12:29AM
 </td>
</tr>
############################################

The text file contains hundreds of tds structure like above. All I need =
is to extract the td with class "PhorumTableRowAlt thread". I have tried =
every possible option, but finally I am coming to you for any Regex for =
it? TIA.

HERE IS WHAT I AM DOING:

pen(TXT, "links.txt") or die "Unable to open file";
my @[EMAIL PROTECTED]
 =3D <TXT>;
close (TXT);
foreach my $link(@[EMAIL PROTECTED]
) {
if ($link =3D~ m|<td class=3D"PhorumTableRow thread" =
style=3D"padding-left: 0px">(.*?)</td>|gsi) {
print "$1";}
}



But NOTHING coming up. No results.

Thanks for any help.

Sara.





------=_NextPart_000_0103_01C8999D.0EC89240--
 




 4 Posts in Topic:
Extracting TD's from a Text File (Regex Help).
sara.samsara@[EMAIL PROTE  2008-04-08 17:22:01 
Re: Extracting TD's from a Text File (Regex Help).
wiggins@[EMAIL PROTECTED]  2008-04-08 07:44:38 
Re: Extracting TD's from a Text File (Regex Help).
noreply@[EMAIL PROTECTED]  2008-04-08 15:50:22 
Re: Extracting TD's from a Text File (Regex Help).
sdavis2@[EMAIL PROTECTED]  2008-04-08 09:44:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Sep 5 11:59:58 CDT 2008.