假设我有一个像这样的块:
<html><!-- let's start the file -->
<body><!-- I'm really chatty -->
</body><!-- here's another useless comment -->
</html><!-- ok, we ended the file -->
Run Code Online (Sandbox Code Playgroud)
我想删除所有评论,并尝试查看Edit -> Find -> Replace Structurally
。
我在此子菜单下没有看到用于删除 HTML 注释的现有模板。有没有一种方法可以将其创建为用户定义的模板或修改现有模板来实现这一目标?
Bas*_*ers 11
您可以使用正则Replace
或Replace in Path
通过正则表达式搜索来实现此目的。使用以下正则表达式:
<!--.*?-->
Run Code Online (Sandbox Code Playgroud)
并替换为空字符串。
归档时间: |
|
查看次数: |
1617 次 |
最近记录: |