I use this regex in Notepad++, to search and replace multiple words.
(good)|(great)|(fine)
(?1bad)(?2worse)(?3not)
Problem is, it doesnt work in Powergrep, any way to alter it? Problem is, Notepad++ has limited lengh or regular expression, and Powergrep doesnt, and it also supports list of regular expressions.
In the PowerGREP manual the replacement with conditionals is never mentioned. I suggest you a generic way around, that solves N search & replace in just 3 steps overall (obviously, if you have only 3 words to replace you may do first replacing them one by one):
First step (adding markers)
Where
(F_1, ..., F_n)are the words (or regular expressions) to replace with the terms(R_1, ..., R_n), respectively.In your example:
Second step (keeping good)
Third step (deleting evil)
If you are working with words that already include the use of curly and squared brakets and you don't want to make mistakes, you can use other markers (angular brackets, triple apexes, and so on and so forth).