#用正则简单过滤html的<>标签
import re
str = "<img /><a>srcd</a>hello</br><br/>"
str = re.sub(r'</?\w+[^>]*>','',str)
print (str)
import re

test='<p>just for test</p><br/><font>just for test</font><b>test</b>'
pat = re.compile('(?<=\>).*?(?=\<)')
result=''.join(pat.findall(test))

相关文章:

  • 2021-09-12
  • 2022-12-23
  • 2021-05-22
  • 2021-05-28
  • 2021-09-14
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-03-09
  • 2021-09-01
相关资源
相似解决方案