Codice PHP:
$stringa = "fuori fuori [b]Contenuto del tag B[/b]pippo pippo";
echo preg_replace_callback('#(?i)(^|[^\\2]+)([b])([^\\4]+)([/b])([^\a]+|$)#',create_function('$w','return preg_replace_callback("/(\w+)/",create_function("\$w","return strlen(\$w[1]);"),$w[3]);'),$stringa);
![]()