1
I have some code several hundred lines long and I want to find each "String" and replace it with a different "String". Example below...
$BR360Button.Add_Click({BR360Button})
$BR368Button.Add_Click({BR368Button})
$BR370Button.Add_Click({BR370Button})
I want to find, ({BR360Button}) and replace with {(new-object -Com WScript.Network).RemoveNetworkDrive("M:"),(start-sleep 1),(new-object -Com WScript.Network).MapNetworkDrive("M:" , "\3600-co\data\store")}
Then find, ({BR368Button}) and replace with {(new-object -Com WScript.Network).RemoveNetworkDrive("M:"),(start-sleep 1),(new-object -Com WScript.Network).MapNetworkDrive("M:" , "\3680-co\data\store")}
Then find, ({BR370Button}) and replace with {(new-object -Com WScript.Network).RemoveNetworkDrive("M:"),(start-sleep 1),(new-object -Com WScript.Network).MapNetworkDrive("M:" , "\3700-co\data\store")}
and so on through the 900 lines. I really don't want to find/replace 900 times.
Any way to do this easily in notepad++?
Thanks in advance.
You already included the regex tag. So what did you try? – Daniel B – 2015-08-20T20:51:56.880
The code I pasted in from above is straight out of powershell. So, any seemingly Notepad++ tags in there is just coincidence. – Nex – 2015-08-20T21:32:27.657