/* preformatted text solution */
$pattern[]="/\[pre\](.+?)\[\/pre\]/is"; 
$replacement[]='<div class="preDiv"><pre>\\1</pre></div>';
/*-- preformatted text solution */