我想删除标签之间的所有内容。一个示例输入可能是
输入:
<body>
start
<div>
delete from below
<div class="XYZ">
first div having this class
<div>
waste
</div>
<div class="XYZ">
second div having this class
</div>
waste
</div>
delete till above
</div>
<div>
this will also remain
</div>
end
</body>
输出将是:
<body>
start
<div>
delete from below
delete till above
</div>
<div>
this will also remain
</div>
end
</body>
基本上,我必须删除第一次出现的整个块<div class="XYZ">
谢谢,