I have a problem on replacing string using regex, seem I can't get it to work
string = "<font x=''>test</font> <font y=''>test2</font> <font z=''>test3</font>"
if re.search("(<font .*?>)", string, re.IGNORECASE):
r = re.compile(r"<font (?P<name>.*?)>.*?</font>", re.IGNORECASE)
string = r.sub(r'', string)
For some reason all the regex deletes the entire string ''. It should return as test test2 test3
re.findalland do this in one step