Buon giorno a tutti.
Tra tutte le funzioni presenti in un file,funzioni.ssi c'è questa:
Codice PHP:
function makeClickableLinks($text){        $text html_entity_decode($text);//originale        $text = " ".$text;        /*$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',                '<a href="\\1" target=_blank>\\1</a>', $text);        $text = eregi_replace('(((f|ht){1}tps://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',                '<a href="\\1" target=_blank>\\1</a>', $text);        $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)',        '\\1<a href="http://\\2" target=_blank>\\2</a>', $text);        $text = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})',        '<a href="mailto:\\1" target=_blank>\\1</a>', $text);*/                        $text = preg_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',                '<a href="\\1" target=_blank>\\1</a>', $text);        $text = preg_replace('(((f|ht){1}tps://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',                '<a href="\\1" target=_blank>\\1</a>', $text);        $text = preg_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)',        '\\1<a href="http://\\2" target=_blank>\\2</a>', $text);        $text = preg_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})',        '<a href="mailto:\\1" target=_blank>\\1</a>', $text);                return $text;} 
Il problema è che non basta sostituire eregi_replace->preg_replace, come immaginavo da ignorante, ma bensì tutta la costruzione.

Devo sostituire questa:
Codice PHP:
$text eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)',                '<a href="\\1" target=_blank>\\1</a>'$text); 
con questa
Codice PHP:
$text preg_replace(????????); 
aiutatemi, per favore.
Grazie come sempre.