I agree. The original regex, as posed by pat mc, removes both \n rather than just the single one that pac mc said was wanted to be removed.
I also presume that pat mc (based upon the inquiry) is looking for regex solutions; but several of the other nodelets in this thread have some good ideas for alternativies to the regex approach.
In reply to Re^2: Why does my Perl regex substitution for linebreak fail?
by ack
in thread Why does my Perl regex substitution for linebreak fail?
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |