So I have this:
z='===hello
there===,
how are ===you===?'
And I want to be:
z='<b>hello
there<\b>,
how are <b>you<\b>?'
I tried doing this:
z = re.sub(r"\={3}([^\$]+)\={3}", r"<b> \\1 </b>", z, re.M)
And it works sort of but I got this instead:
z='<b>hello
there===,
how are ===you<\b>?'
I'm still new to this but I believe it's the ^ and $ that makes it match the beginning and the end of the string. So how do I change it so it matches the ones in the middle?