import re
def trimXMLComments(fieldstr):
fieldstr= re.sub(r'<\!\-\-.*?\-\->',"", fieldstr)
return fieldstr
import re
def trimXMLComments(fieldstr):
fieldstr= re.sub(r'<\!\-\-.*?\-\->',"", fieldstr)
return fieldstr
本文标题:正则表达式 去除xml html的注释
本文链接:https://www.haomeiwen.com/subject/zdhskqtx.html
网友评论