I have a bunch of code with from time to time this pattern in my script:
Write-Output " * + Some Text1"; LOGUJ "+ Some Text1"
Write-Output " * + Some Text2"; LOGUJ "+ Some Text2"
Write-Output " * + Some Text3"; LOGUJ "+ Some Text3"
[...]
Write-Output " * + Some Textn"; LOGUJ "+ Some Textn"
What I need to do is replace center of it to:
LOGOUTPUT "+ Some Text1"
LOGOUTPUT "+ Some Text2"
LOGOUTPUT "+ Some Text3"
[...]
LOGOUTPUT "+ Some Textn"
Basically I have the same pattern - need to always replace everything from word: "Write-Output" until word "LOGUJ" with one the same word: "LOGOUTPUT".
Its can be done with NP++, or maybe other tools are clever to do this? :)