Reputation: 620
i have multiple files that i must edit, example:
Process.Start process 1234154
Start test
Process.Start
Process.Start process example
now i need to do search and in every line where is "Process.Start process" at end of that line i need to add "shell=True" word
any fast way to do that? my search is (Process.Start process) but Im not sure how to add text on end of that specific line
Upvotes: 0
Views: 1382
Reputation: 5706
Press Ctrl-H, select the regular expression match, then search for (Process\.Start process.*)
and replace it with \1 shell=True
.
\1
means "whatever is matched by the first parentheses in the search string", so in this case it would be the whole line. The dot between "Process" and "Start" must be escaped with a backslash or it will be treated as a special character meaning "anything". .*
means: any number of any characters, so that it doesn't matter what comes after "Process.Start process", it will always match.
Upvotes: 1