Hm hah. I thought I got it but maybe I don’t. Still, worth a try. (Indulge me. All will be clear, even why I possibly don’t get it.)
The texts in the FindChangeList.txt file are not ‘normal’ text; they do not get copied literally into the GREP find & change fields. It’s more complicated than that: the entire file is loaded into Javascript, as a single large Javascript object, before processed and fed one by one into the Find and Change dialog – and so, Javascript’s Text Rules are applied to this file.
There are lots of rules, most of them logical (“all of the text strings must start and end with a double quote” is one, and so is “there may not be a loose ” inside a text string”), but one rule in particular remains sneaky and elusive, as often as it does get mentioned:
ALL BACKSLASHES ARE PROCESSED IMMEDIATELY BY JAVASCRIPT.
yes, i used full caps for that. sorry. to make up for it, i typed this sentence all lowercase.
This statement means that an entry such as ‘\r’ is not “copied” straight into the GREP field; the CODE for a Hard Return is. That is not something you can do in the user interface – pressing the “Return” key will not insert a return. Fortunately, it does not matter whether GREP receives the code for a hard return or the two characters ‘\’ and ‘r’; the latter is a Known Code (for GREP) and so it converts it to Code For A Hard Return. No big deal.
BUT since ALL BACKSLASHES (etc.), this not only means that ‘\r’ gets fed into GREP as a literal hard return (because Javascript processes the text), but the same goes for the ‘\z’. And what does Javascript translates ‘\z’ in? Um – it is not one of the (very few!) backslash escape codes that it knows, so it throws away the backslash and only the ‘z’ remains. The text that is sent to GREP is then “[Code For A Literal Hard Return]+z”, which is Not What You Meant.
The trick is to DOUBLE UP BACKSLASHES. A Double Backslash is a known escape code for Javascript, and it means “please insert a Single backslash here”. A text “r+z” gets read by Javascript and then passed on as “\r+\z” into GREP, exactly the way you want it to.
So why am I unsure? Well: “… it gets rid of all the returns EXCEPT FOR ONE.” According to my little story above, it should not have worked at all (unless you happened to have a single ‘z’ at the very end of your story).
But don’t despair. Doubling-up the backslashes will remove all uncertainties, and it ought to make all of your GREP codes do what you meant by design, rather by accident.