我在html文件中有这行代码,我需要从中删除一些代码。
<div class="viewpoint">
<h2>View (2)</h2><a href="./Viewpoints — 100 MOUNT ST160506.nwd_files/vp0002.jpg" title="View (2)"><img src="./Viewpoints — 100 MOUNT ST160506.nwd_files/vp0002.jpg"></a><span class="namevaluepair"><span class="name">Camera Position</span><span class="value">112.933ft,
93.975ft,
145.095ft</span></span><div class="comments">
<div class="spacer"></div>
<div class="comment">
<h4>Comment 2</h4><span class="namevaluepair"><span class="name">Status</span><span class="value">New</span></span><span class="namevaluepair"><span class="name">User</span><span class="value">User1</span></span><span class="namevaluepair"><span class="name">Text</span><span class="value">Grid G4 - Level B5</span></span>2016/5/9
0:45:10</div>
<div class="spacer"></div>
</div>ARC and STR to coordinate slab edge and raft profile<div class="spacer"></div>
</div>
之后的任何事情
</a>
应该删除到word&#34; Grid ....&#34;
我尝试了不同的方法但没有用。
此外,上面的代码对每张图片重复多次(即vp0001.jpg,vp0002.jpg等)
答案 0 :(得分:0)
试试这个:
找到:</a>.+?Grid
替换为:</a> Grid
搜索模式:Regular expression
,. matches newline
这给出了
的输出<div class="viewpoint">
<h2>View (2)</h2><a href="./Viewpoints — 100 MOUNT ST160506.nwd_files/vp0002.jpg" title="View (2)"><img src="./Viewpoints — 100 MOUNT ST160506.nwd_files/vp0002.jpg"></a> Grid G4 - Level B5</span></span>2016/5/9
0:45:10</div>
<div class="spacer"></div>
</div>ARC and STR to coordinate slab edge and raft profile<div class="spacer"></div>
</div>
如果这不对,请使用所需的输出更新操作