develooper Front page | perl.beginners | Postings from April 2008

Getting more than one match with regexp

Thread Next
From:
Jim
Date:
April 14, 2008 08:07
Subject:
Getting more than one match with regexp
Hi all,

I have some code (below) that retrieves an URL from $response-
>content. $response->content contains an RSS a retrieved RSS file.

How would I retrieve all the URLs in $response->content instead of
just the first one?

if($response->content =~ m/http:(.*?).mp3"/)
{
      		$url = "http:" . $1 . ".mp3";

}


Thanks for your time

Regards,
Jim


Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About