我在一个文件夹中有很多html文件。我需要以某种方式从所有这些中删除<div id="user-info" ...>...</div>
。据我所知,我需要使用Perl脚本,但我不知道Perl这样做。有人可以帮我吗?用Perl搜索并替换多个html文件中的多行的脚本
这里是 “坏” 的代码的样子:
<div id="user-info" class="logged-in">
<a class="icon icon-key-delete" href="https://test.dev/login.php?0,logout=1">Log Out</a>
<a class="icon icon-user-edit" href="https://test.dev/control.php">Control Center</a>
</div> <!-- end of div id=user-info -->
预先感谢您!
http://stackoverflow.com/questions/1030787/multiline-search-replace-with-perl – alestanis
对不起,我无法弄清楚。我之前没有任何PERL经验。 – user1751343
只是一个建议的话,我们更喜欢你是否试图自己解决这个问题,而不是要求社区为你提供一个完整的解决方案,即使你的尝试完全被破坏了。谢谢。 – Kev