That isn't my problem with this one.
preg_match_all("'<as+hrefs*=s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\1 | ([^s>]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space
'isx",$document,$links);
in a sample link
<a href="http://www.somesite.com/somepage.html">Click Here For More</a>
This part of the code stops the strippign with the second " marks and therefore returns on the url of the link:
http://www.somesite.com/somepage.html
I know the code can be changed to return the url and the link text, it is just beyond my ability to change it.
I'd actually like to change the code to return to the url and link title
http://ww.somesite.com/somepage.html">Click Here For More