Rename: Replace multiple spaces with one space

I have created a button to replace several consecutive spaces with a single space

Rename PATTERN=" " TO=" " FINDREP (2 spaces > 1 space)
Rename PATTERN=" " TO=" " FINDREP (3 spaces > 1 space)
Rename PATTERN=" " TO=" " FINDREP (4 spaces > 1 space)

But is there a way to reduce this code to a single line?

You can do it with a repeating regular expression:

Rename REGEXP PATTERN="(.*)  (.*)#" TO="\1 \2" IGNOREEXT
3 Likes

Thank you very much @Jon, every day more impressed with the possibilities of this excellent program! :grinning:

1 Like