if you need to chop out the text portion from the url, turning,

<a href="link.html">text</a>
into
<a href="link.html"></a>

you can do it simply by using 

$str = preg_replace('#(<a.*?>).*?(</a>)#', '$1$2', $str);