[python] 2024-04-28 圈点485
摘要:python过滤掉html中style的css样式的正则表达式,z = re.sub('\s+style=\"[^"]*\"','',a,0,re.I)
python过滤掉html中style的css样式的正则表达式
1,过滤掉style
z = re.sub('\s+style=\"[^"]*\"','',a,0,re.I)
2,过滤掉img图片标签
z = re.sub('<img\s+src=\"[^"]*\">','',a,0,re.I)