Hello
I'm trying to make a pattern for tags, but the sub method just replace the first char and 3 at the end of the line, im trying to replace all tags on the line and with multiline
p=re.compile('<img=([^}]*)>([^}]*)</img>', re.S)
p.sub(r'[img=\1]\2[/img]','<img="test">dsad</img> <img="test2">dsad2</img>')
output:
'**[**img="test">dsad</img> <img="test2"]dsad2**[/img]**'