I've have a problem with my bb-code parsing again,
$QuoteLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td class="BBquotecodeheader"> '.$text['forum_BBquote'].'</td></tr>
<tr><td class="BBquotebody">$1</td></tr></table>';
preg_replace("/\[quote\](.+?)\[\/quote\]/is","$QuoteLayout", $post);
this is how I parse the quote-code.
now to my problem. how can I solve a correct parsing of double-quoting?
[ quote]I talk about what he wrote: [ quote]bla bla bla[/ quote] And I think bla bla bla[/ quote]
will make the first [ quote] and first [/ quote]match, and the second [ quote]
won't be matched with the second [/ quote]
when the first quote should be matched with the last /quote and the inner ones with each other
anyone got a good idea how to possible parse this correct?


Sign In
Create Account

Back to top










