in reply to How to strip everything in a string except HTML Link
For production code that will be used regularly or by other people, I would use one of the HTML-parsing modules mentioned earlier. For a one-time grab, a regex may be good enough to get the job done. If there's only one A link in the block of text:
$text =~ s|^.*(<a .+?</a>).*$|$1|s;
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.
|
|---|