Advanced bbcode parser