Just a little question.
I have to quote a text inside a couple of string taking the first occurrence of one and the last occurrence of other.
Ex.
[quote]
Hi to all
[quote]
im fine
[/quote]
[/quote]
I hate to inscribe all the quoted text inside a DIV. So I have a regexp like:
String pattern = "\\[quote\\](.*?)\\[\\\quote\\\]";
body = body.replaceAll(pattern, "<div class=\"quote\">[quote]$1[/quote]</div>");
It works but the regexp take from first [quote] to first [/quote] leaving the second [/quote] outside the DIV. What I want obtain is:
<div class="quote">
[quote]
Hi to all
[quote]
im fine
[/quote]
[/quote]
</div>
Thanks.