codice:
preg_replace("#\[a\](.*?)\[b\]#si","<a href=\"\\2\">\\2</a>
",$testo);