Hi,
I've struggled with regular expressions since learning sed in 1990. Some
day, the light
*will* go on just like it did for linked lists, but I'm waiting. I've
re-read the perlfaq perlre
and re-reviewed Mastering Regular Expressions.
What I want to do is pull out the first and the second http strings, and
set them equal to two
variables. I've tried backreferences, matching on ", and just keep
getting garbage.
My latest version is:
($url = $info) =~ m/a.*href="(.*)"/;
($image = $info) =~ m/img.*src="(.*)"/;
Please consider DATA to be the equivalent of $info.
Thanks!
__DATA__
<a href="http://www.qksrv.net/click-297915-253189"
target="_top" >
<img
src="http://photo.towerrecords.com/coverart/muze_video/137/137911.jpg"
alt="Jewel Ofthe Nil E (WS/DD)"></a>
<img src="http://www.qksrv.net/image-297915-253189"
height="1" width="1" border="0">