P is for Practical | |
PerlMonks |
Re: REGEX for urlby graff (Chancellor) |
on Apr 25, 2016 at 21:44 UTC ( [id://1161484]=note: print w/replies, xml ) | Need Help?? |
It looks like you're just trying to extract values of href= attributes from anchor tags (i.e. the "..." from <a href="...">) in html data.
I'm surprised that no one yet has mentioned that there are CPAN modules for doing exactly that - e.g. HTML::LinkExtor, among others. (I haven't had occasion to use them myself. but to do what you're doing, I'd start with one of those.)
In Section
Seekers of Perl Wisdom
|
|