记事本++正则表达式搜索并在行尾添加

notepad++ regex search and add at end of line

我有多个文件需要编辑,例如:

Process.Start process 1234154

Start test

Process.Start

Process.Start process example

现在我需要进行搜索,在每一行末尾 "Process.Start process" 我需要添加 "shell=True" 词

有什么快速的方法吗? 我的搜索是(Process.Start 过程)但我不确定如何在该特定行的末尾添加文本

按Ctrl-H,select正则表达式匹配,然后搜索(Process\.Start process.*)替换为 shell=True.

</code> 表示 "whatever is matched by the first parentheses in the search string",因此在这种情况下,它将是整行。 "Process" 和 "Start" 之间的点必须用反斜杠转义,否则将被视为特殊字符,意思是 "anything"。 <code>.* 表示:任意数量的任意字符,因此无论 "Process.Start process" 之后是什么都无所谓,它始终匹配。