I have the following string I need to parse:
[QUOTE=Mark]
[QUOTE=Jack]
How are you doing Mark?
[/QUOTE]
Good to hear from you Jack, Im doing fine!
[/QUOTE]
I am basicly trying to convern this set of BBCode into HTML by converting the [quote] areas into stylized DIVs using the following REGEX
text = text.replace(/\[QUOTE=(.*?)]([\s\S]*?)\[\/QUOTE\]/gi, '<div class="quotes"><i>Quote by $1</i><br />$2</div>');
This code will properly parse out the first set of QUOTES, but not the nested level quotes. Any ides how I could impprove the expression?