Hello,
I have this line of html code:
<a href="http://someadress">Sometext</a><img src="/img/image.gif" width=10 height=16 alt="Something">
.
Now I want to get the url ("someadress") out of the code.
Therefor I use this code:
$data = "myhtmlsite.html";
preg_match_all("|<a[[:space:]]*href=\"(.*)\">|",$data,$urls);
which returns:
"http://someadress">Sometext</a><img src="/img/image.gif" width=10 height=16 alt="Something
instead of
"http://someadress"
How can I change the regular expression, so that I get the correct result?
Thanks,