74. Notepad++的功能详解
然后得知是用反斜杠,加上数字,实现向后引用(back reference)。
Notepad++的正则表达式的语法
不过后来也找到了其他更专业和全面的解释:[11]
digit
Backreference:
1 matches an additional occurence of a text matched by an earlier
part of the regex. Example: This regular expression: ([Cc][Aa][Ss][Ee]).*
1 would match a line such as Case matches Case but not Case doesn't
match cASE. A regex can have multiple subgroups, so 2, 3, etc can be
used to match others (numbers advance left to right with the opening
parenthesis of the group). So n is a synonym for gn, but doesn't
support the extension syntax for the latter.
注意
之前就知道Notepad++底层是使用SciTE的库的,也顺便找到了SciTE的关于正则表达式的
解释[12]
不过其中关于backreference的解释很不清楚。
最后写出正确的语法:
查找目标 :
images/env_var/win/(w+).jpg
替换为(P):
images/env_var/win/1.png
可以成功替换为:
62
161. Notepad++的功能详解
与google search的,还有类似的:
• Get php help Alt+F1: 调用php帮助,对查找php函数等有帮助
• Wikipedia Search :调用维基百科搜索选定文字
在同一界面的其他功能有:
• Open current dir cmd: 打开cmd且定位到当前文件夹,功能等价于:[14]
• Open cotaining folder: 打开当前文件所在文件夹
3.19.5.1. 更改google搜索功能的快捷键
如果想要改变这些Alt+F2之类的快捷键,Notepad++也是支持的:
设置(T) ⇒ 管理快捷键...
149