def minimizeHTML(s):
 s = re.sub('<span style="font-weight:600;">(.*?)</span>', '<b>\\1</b>', s)
 s = re.sub('<span style="font-style:italic;">(.*?)</span>', '<i>\\1</i>', s)
 s = re.sub('<span style="text-decoration: underline;">(.*?)</span>', '<u>\\1</u>', s)
 return s

def minimizeHTML ( s ) : s = re . sub ( '<span style="font-weight:600;">(.*?)</span>' , '<b>\\1</b>' , s ) s = re . sub ( '<span style="font-style:italic;">(.*?)</span>' , '<i>\\1</i>' , s ) s = re . sub ( '<span style="text-decoration: underline;">(.*?)</span>' , '<u>\\1</u>' , s ) return s
correct qts verbose bold/underline/etc .