我想从 html 文件中删除标签....但只有具有特定属性的标签。
例如,我可能有以下代码:
<span class = 'A'>This is the first sentence.</span><span id = 'B'>This is the second sentence</span>
我想删除所有出现<span id = 'B'>
的结果如下
<span class = 'A'>This is the first sentence.</span>This is the second sentence
有任何想法吗?