我有如下代码行:
Some text SELLO S-2 BREAK &Logic,0
Some other text SELLO S-2_BREAKTWO &Logic,0
Wear EXT &SELO-344 S-2,0,30
找到 S-2 后,是否可以复制并插入新的编辑行,然后用 S-4 替换 S-2,如下所示?
Some text SELLO S-2 BREAK &Logic,0
Some text SELLO S-4 BREAK &Logic,0
Some other text SELLO S-2_BREAKTWO &Logic,0
Some other text SELLO S-4_BREAKTWO &Logic,0
Wear EXT &SELO-344 S-2,0,30
Wear EXT &SELO-344 S-4,0,30
答案1
- 在 notepad++ 中打开查找和替换对话框
- 检查“正则表达式”
- 确保“.匹配换行符”未被选中
- 查找内容:
^(.*)S-2(.*)$
替换为:$0\n$1S-4$2
- 按“全部替换”
看看它怎么运作这里。