<? $texto = "[#enlace->direccion#] [#enlace->direccion#]"; echo $texto . "\n"; $texto = preg_replace("/\[#(.*)?-(>|>)(.*)?#\]/i", '<a href="$3">$1</a>', $texto); echo $texto; ?>