我有一个字符串:
"<ANY>
some STUFF here
Obary SEES Obary
</ANY>
<SOME>
..."
现在我要删除&lt;&gt;之间的东西和&lt;&gt;得到:
"
some STUFF here
Obary SEES Obary
..."
我尝试了什么:
new = []
for m in re.finditer("!<[A-Z]*>|!<\/[A-Z]*>|[A-Z][a-z]+|[a-z]+", my_text):
new.append((m.group(0)))
好吧,现在我输了#34; STUFF&#34;和&#34; SEES&#34;。如何在不丢失其他内容的情况下摆脱所有"<ASDF>"
?