我已经从论坛中提取了一些信息。现在我拥有的是原始字符串:
string = 'i think mabe 124 + <font color="black"><font face="Times New Roman">but I don\'t have a big experience it just how I see it in my eyes <font color="green"><font face="Arial">fun stuff'
我不喜欢的是子字符串"<font color="black"><font face="Times New Roman">"
和"<font color="green"><font face="Arial">"
。除此之外,我想保留字符串的其他部分。因此,结果应该像这样:
resultString = "i think mabe 124 + but I don't have a big experience it just how I see it in my eyes fun stuff"
我该怎么做呢?实际上,我使用了beautiful soup从论坛中提取了上述字符串。现在,我可能更喜欢使用正则表达式来删除这部分内容。
"
和'
。 - juliomalegria