【问题标题】:notepad++ regex search replace in html tag记事本++正则表达式搜索替换html标签
【发布时间】:2014-03-25 22:29:32
【问题描述】:

我想要的是替换:

<meta name="description" content="some content here"> 

<meta name="description" content="">

我希望notepad++不会太难。

【问题讨论】:

    标签: regex replace notepad++


    【解决方案1】:

    你可以这样做:

    1. content="[^"]*" 替换为content=""

    见截图

    除非您特别希望内容属性仅来自元标记

    【讨论】:

    • @user3278890 感谢您的确认。如果它对您有用,请接受我的回复作为正确答案 - 以便其他用户可以受益:知道答案有效并将问题标记为已回答
    【解决方案2】:

    在替换对话框中启用“正则表达式” 并尝试搜索:

    <meta name="description" content="[A-Za-z0-9].*">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-19
      • 1970-01-01
      • 1970-01-01
      • 2017-02-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-12
      • 2020-05-22
      相关资源
      最近更新 更多