verifing a string

[email protected] (Eelco Alosery) Wed, 31 Jul 2002 19:21:04 +0200
Newsgroups perl.macperl.anyperl
Message-ID <B96DE920.144C%[email protected]>
I read whit LWP::Simple a url, and from that string i need the keywords.

I use this script:


if ( $srting =~ s/<META NAME="keywords" CONTENT="(.+)">/$1/ig )
{
$keywords = $1;
}

But this code only read the keywords if it is one line and no bad html, like
this:
<META NAME="keywords" CONTENT="test, good">

if the string contans for example this:
<META NAME="keywords" CONTENT="
test, good">

or this:
<META NAME="keywords" CONTENT="test, good" >

It wil not read the keywords.

How will i fix this problem