因此,基本上,我需要编辑如下内容:
@john TEST TEST TEST
@andrew EXAMPLE EXAMPLE
@geady JK JK JK
我需要将它们全部替换才能得到这样的效果:
@replaced TEST TEST TEST
@replaced EXAMPLE EXAMPLE
@replaced JK JK JK
我如何使用 notepad++ 实现这一点?提前致谢!
答案1
- Ctrl+H
- 找什么:
@\w+
- 用。。。来代替:
@replaced
- 检查环绕
- 检查正则表达式
- Replace all
解释:
@ # literally
\w+ # 1 or more word character (i.e. [a-zA-Z0-9_])
You may use \S+ if you want to match any character that is not a space
给定示例的结果:
@replaced TEST TEST TEST
@replaced EXAMPLE EXAMPLE
@replaced JK JK JK