title: PHP - BBCode parser - recursive [quote] with regex and preg_replace
body: <p>i'm making my own bbcode parser, and i've a problem when i try to do the recursive quote.</p>
  
  <p>this is my code :</p>
  
  <pre><code> function forumBBCode($str){
  $format_search=array(
  '#\[quote=(.*?)\](.*?)\[/quote\]#is'
  );
  
  $format_replace=array(
  '&lt;blockquote class="quotearea"&gt;&lt;i&gt;&lt;a class="lblackbu" href="./index.php?status=userview&amp;userv=$1"&gt;$1&lt;/a&gt; wrote :&lt;/i&gt;&lt;br /&gt;$2&lt;/blockquote&gt;'
  );
  
  $str=preg_replace($format_search, $format_replace, $str);
  $str=nl2br($str);
  return $str;
  }
  </code></pre>
  
  <p>what i must add/edit to do a recursive quote? 
  in other words, when a quote is inside another quote...</p>
  
  <p>cheers and tnx for the help</p>