salve ragazzi!
se io ho
[code]$txt = preg_replace( "#(^|\s)((http)://\|file\|(.*)\|\d+\|\w+\|/?)#ie" , "\$this->regex_build_ed2k(array('html' => '\\2', 'show' => '\\2', 'st' => '\\1'))", $txt );
[Code]
e quindi chiamo la funzione
come faccio a mettere al posto di XXX la parte dell'url inserito sopra identificata da \w+\?codice:function regex_build_ed2k($url=array()) { return "<a href=http://www.sito.com/format?type="XXX"></a>. $url['st'] . "".$show."" . $url['end']; }
Grazie