【问题标题】:Find and replace code before div container在 div 容器之前查找和替换代码
【发布时间】:2019-09-26 11:06:24
【问题描述】:

尝试使用 Sublimetext 清理大约 900 个 html 文件中的一些代码。

什么是正则表达式来查找和替换所有代码之前 <div class="dngContent"> & 所有代码之后 </div><!-- dngContent--> ?

https://imgur.com/a/DZlqg0n

【问题讨论】:

    标签: html regex sublimetext3


    【解决方案1】:

    我会分几步做这样的事情。

    • 删除所有\n\r,将其替换为空。
    • 找到
      • 其中:^.*
        (.*)
        .*$
      • 替换:$1
    • 使用自动格式添加\n(如果需要)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-26
      • 1970-01-01
      • 2017-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多