Hi to all,
I'm writing a very simple bbcode parse. If i want to replace hello i'm a [b]bold[/b] text
, i have success with replacing this regex
r'\[b\](.*)\[\/b\]'
with this
<strong>\g<1></strong>
to get hello, i'm a <strong>bold</strong> text
.
If I have two or more tags of the same type, it fails. eg:
i'm [b]bold[/b] and i'm [b]bold[/b] too
gives
i'm <strong>bold[/b] and i'm [b]bold</strong> too
How to solve the problem? Thanks