【问题标题】:Is it possible to use wildcards for Notepad++ search & replace是否可以使用通配符进行 Notepad++ 搜索和替换
【发布时间】:2013-01-08 03:51:36
【问题描述】:

我非常希望你能做到这一点,我有超过 1000 次出现的实例在整个文档中略有变化,需要稍微更改,我想知道我是否可以在记事本++中做到这一点

我需要改变的是:

[[image:CWI155 ICS Work station setup_html_2b817479.gif||height="4" width="602"]]

{{lightbox image="CWI155 ICS Work station setup_html_2b817479.gif" height="4" width="602" group="a"/}}

任何帮助将不胜感激

【问题讨论】:

    标签: notepad++ wildcard replace


    【解决方案1】:

    尝试将搜索模式设置为“正则表达式”并使用以下搜索/替换值。

    找到什么:

    \[\[image:([^\|]+)\|\|height="(\d+)" width="(\d+)"\]\]
    

    替换为:

    {{lightbox image="\1" height="\2" width="\3" group="a"/}}
    

    如果图像、高度和宽度值是变化的部分,这应该可以解决问题。

    【讨论】:

    • 我没有检查你的正则表达式,但我同意正则表达式是正确的方法。
    猜你喜欢
    • 2015-06-23
    • 2011-12-24
    • 2011-03-07
    • 1970-01-01
    • 2019-05-17
    • 1970-01-01
    • 2016-04-05
    • 2013-10-17
    • 2018-05-12
    相关资源
    最近更新 更多