prova così:
Codice PHP:
$text preg_replace('#<a href=\"(.*?)\">(.*?)</a>#si''\\2'$var);