in reply to
Remove Double Spacing
s/(?<=\w) (?=\w)//g; s/\n\n/\n/g; s/ / /g;
[download]
Seems to work on the sample.
Comment on
Re: Remove Double Spacing
Download
Code
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.
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom