Hey all,
I'm trying to parse some URLs out of strings, but I'm having 0 luck with it. I'm terrible with RegEx, so hopefully someone can come in here and give me a hand.
I'm parsing code that could look like this:
<a href="/news/archive.asp">Archive</a> / <a href="/news/search.asp">Search</a><br>
or like this:
<a href="/community/links.shtm">Links</a><br>
Now what I want are the contents of the quotations, following a href=
So basically, I want a variable (lets call it $ParsedURL) to contain /comunity/links.shtm
And nothing else, not the <a href>, not the stuff following it, nothing.
Just EXACTLY whats in the quotations, it doesn't matter if its a mailto: or a [url]http://[/url] or an [url]ftp://,[/url] I just want the exact contents.
I can't figure it out for the life of me, maybe someone else can?
EDIT: Oh, and this code is in an array whcih could contain lines that don't have a link on 'em at all, could just be straight text, so we can't just assume its always a link.