Striping URL's and related Text from a web page
Posted: Wed Jan 08, 2003 12:27 pm
I'd like to take an existing page of markup and strip everything but the links within. Basically the page consists of 5 formatted links and associated text and the page formatting.
So i'd like to turn this:
Into this:
Any help greatly appreciated.

So i'd like to turn this:
Code: Select all
<html><body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><table
width=120 height=632 border=0 cellspacing=0 cellpadding=0><tr valign=bottom
align=center><td><A
href=http://www.amazon.co.uk/exec/obidos/redirect?tag=member-21&creative=14
10&camp=210&link_code=bn1&path=tg/stores/browse/-/welcome/468294
target=_top><IMG
src=http://rcm-images.amazon.com/images/G/02/associates/recommends/recommend
s_120x60.gif border=0 height=60 width=120 alt=amazon.co.uk></A></td></tr><tr
valign=top align=center><td><table border=0 cellspacing=0 cellpadding=1
bgcolor=#000000 width=120 height=572><tr><td width=100% height=100%><table
border=0 cellspacing=0 cellpadding=0 width=118 height=570><tr
bgcolor=#FFFFFF><TD><table width=118 height=570 cellpadding=0 cellspacing=0
border=0 align=center valign=middle><tr><td align=center valign=top><table
cellpadding=1 cellspacing=0><TR valign=top><TD align=center valign=top>A
href=http://www.amazon.co.uk/exec/obidos/redirect?tag=member-21&creative=14
10&camp=210&link_code=bn1&path=tg/sim-explorer/explore-items/-/0764550462/0
target=_top><FONT face=Arial size=-1 color=3366FF>Homebrewing For
Dummies</font></a><br><FONT face=Arial size=-2 color=000000>Nachel<br>Our
Price: <font color=990000>$17.99</font></td></tr></table></td></tr><TR
height=20 width=118 bgcolor=#FFFFFF valign=top><TD align=center
valign=bottom><FONT face=Arial size=-2 color=A1A1A1>Prices May Change<br><A
href=http://rcm.amazon.com/e/cm/privacy-policy.html?o=2 target=_top><FONT
face=Arial size=-2 color=A1A1A1>Privacy
Information</FONT></A></TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE>
</TD></TR></TABLE></body></html>Code: Select all
http://www.amazon.co.uk/exec/obidos/redirect?tag=member-21&creative=14
10&camp=210&link_code=bn1&path=tg/sim-explorer/explore-items/-/0764550462/0|Homebrewing For
Dummies|£17.99