in reply to Removing extra spaces
s/\s(\s?)/$1/g [download]
Match a single space, and optionally a second space. Capture that second space if it exists. Replace with the capture, which will be either nothing, or the second space.
Dave