Hi All,
I have being working on PHP perl compaitable regular expressions for the last
month and cannot work out how to program a preg_match_all that will get the
"file.html" from the following examples:
<a href="file.html">
<a href='file.html'>
<a href=file.html>
<frame src="file.html">
<frame src='file.html'>
<frame src=file.html>
The preg_match_all I have below only works for <a href="file.html"> but not for
the other variations...
preg_match_all("|href=\"?([^\"' >]+)|i", $data, $links);
I tried the preg_match_all below, but that didn't work...
preg_match_all("|(href|src)=([^\"']+)?([^\"' >]+)|i", $data, $links);
Any help would be greatly appreciated.
Regards,
Michael.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php