Copy link to clipboard
Copied
I have been tasked with making a bunch of documents made in an old clunky piece of software into Indesign files. The old software makes all line shifts full returns (some of which have extra spaces in front and behind them), and things that are supposed to be real returns are just double returns. Also it's intersperced with double spaces. It's a whole mess.
I wanna just be able to press "change all" in the story and have these things be largely fixed, so I came up with (|\s+)\r(|\s+)(?!\r)|\s{2,} to replace all my problems with a space.
It almost does everything I want it to do. Problem is, as soon as I add any other variables other than \r and (?!\r) it starts matcing repeating returns, which of course would remove the returns I actually need.
I've been trying a bunch of iterations where I don't include the plus, do different hierarchies and systematically removed and isolated several parts of it, and it always ends up matching repeating returns unless it's \r(?!\r).
Can someone tell me what I'm doing wrong?
I think it might be easier to do it in steps.
One way to deal with the double returns is to find them and replace with something else that would not otherwise occur, say [ZZZ]. then at the end you can find /[ZZZ/] and replace with a return.
Copy link to clipboard
Copied
I think it might be easier to do it in steps.
One way to deal with the double returns is to find them and replace with something else that would not otherwise occur, say [ZZZ]. then at the end you can find /[ZZZ/] and replace with a return.
Copy link to clipboard
Copied
I ended up modifying the "findChangeByList" script using your trick.
Works like a charm!
Thanks