PCRE code
Posted: Fri Jun 27, 2008 8:20 am
Hi,
I have some problems with getting the address from a <A> tag.
I made this little function:
but...
There is some error.
Its retrieving me the same string i entered.
Any one see the problem?
Ty
I have some problems with getting the address from a <A> tag.
I made this little function:
Code: Select all
function href_d($string)
{
preg_replace("#<a[?: href=('|\")((\w:/\.\?\#&=\-)*)\\2]?[\w\"'_\s]*>#iU","1 \\2",$string);
htmlspecialchars($string);
return $string;
}There is some error.
Its retrieving me the same string i entered.
Any one see the problem?
Ty