in reply to Remove Double Spacing

s/(?<=\w) (?=\w)//g; s/\n\n/\n/g; s/ / /g;
Seems to work on the sample.

Replies are listed 'Best First'.
Re^2: Remove Double Spacing
by mpeters (Chaplain) on Jan 28, 2005 at 19:07 UTC
    This: s/(?<=\w) (?=\w)//g; should probably be s/(?<=\S) (?=\S)//g; since there are other characters besides alphanumeric.