So, I want to match the following link structures with a preg_match_all in php..
<a garbage href="http://this.is.a.link.com/?query=this has invalid spaces" possible garbage>
<a garbage href='http://this.is.a.link.com/?query=this also has has invalid spaces' possible garbage>
<a garbage href=http://this.is.a.link.com/?query=no_spaces_but_no_delimiters possible garbage>
<a garbage href=http://this.is.a.link.com/?query=no_spaces_but_no_delimiters>
I can get " and ' deilmited urls one by doing
'#<a[^>]*?href=("|\')(.*?)("|\')#is'
or I can get all 3, but not if there are spaces in the first two with:
'#<a[^>]*?href=("|\')?(.*?)[\s\"\'>]#is'
How can I formulate this so that it will pick up " and ' delimited with potential spaces, but also properly encoded URLs without delimiters.