in reply to Replace a word in a line except for the last char of the word?

Hm. Some of these are so long. This seems to do the job.

s/ +( )/ $1/g

As mentioned by cog, be mindful that it must be   with the semicolon.