To answer as a general exercise, run
- replace all
cout.*<<.*\K<<with+, many times until it can’t match. - replace all
cout.*<<.*\Kendlwith"\\n", many times - replace all
cout.*<<.*\K(?<!\))(?=;)with\) - replace all
cout.*<<withConsole.Write\(
from perlre
\K(Keep the stuff left of the \K)(?<!..)A zero-width negative lookbehind assertion.(?=..)A zero-width positive lookahead assertion.
1
solved Regular expressions in Notepad++. How make pattern that could be use in a few lines