Prova così:
Codice PHP:
echo preg_replace("#\\[url=(.+?)\\](.+?)\\[/url\\]#i""<a href=\"\\\\1\">\\\\2</a>"$stringa