Codice PHP:
$nuova_stringa = preg_replace("/<a(.+?)href=\\"([^\\"]*?)\"([^>]*?)>([^<]*?)<\\/a>/i", "<a\\\\1href=\\"clic.php?site=\\\\2&testo=\\\\4\"\\\\3>\\\\4</a>", $stringa);
Codice PHP:
$nuova_stringa = preg_replace("/<a(.+?)href=\\"([^\\"]*?)\"([^>]*?)>([^<]*?)<\\/a>/i", "<a\\\\1href=\\"clic.php?site=\\\\2&testo=\\\\4\"\\\\3>\\\\4</a>", $stringa);