Re: [MacPerl-AnyPerl] verifing a string
[email protected] (Keary Suska) Wed, 31 Jul 2002 12:47:01 -0600
| Newsgroups | perl.macperl.anyperl |
|---|---|
| Message-ID | <B96D8CC4.112CC%[email protected]> |
on 7/31/02 11:21 AM, [email protected] purportedly said: > 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 $srting =~ s/<META NAME="keywords" CONTENT="(.+)".*?>/$1/igs Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet"