in reply to Replace a word in a line except for the last char of the word?
s/ (?= )/ /g; [download]
(?=) matches only if what's between the "=" and the ")" is found to the right of the expression. This means the expression matches a space *only* if it is followed by another space.