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)
(F_1)|(F_2)|(F_3)|...|(F_n)
{\1[R_1]}{\2[R_2]}{\3[R_3]}...{\n[R_n]}
Where (F_1, ..., F_n)
are the words (or regular expressions) to replace with the terms (R_1, ..., R_n)
, respectively.
In your example:
(good)|(great)|(fine)
{\1[bad]}{\2[worse]}{\3[not]}
Second step (keeping good)
\{[^\[\]\{\}]+\[([^\[\]\{\}]*)\]\}
\1
Third step (deleting evil)
\{\[[^\[\]\{\}]*\]\}
null
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).