Page 1 of 1

Remove carriage returns in column 81

Posted: Fri Dec 05, 2003 6:53 pm
by Michael Cook
I am copying data from a terminal which will wrap long (more than 80 characters) lines. When I copy and paste there are carriage returns at each line wrap.

How can I remove carriage returns if and only if they are in the 81 column?

Thanks.

Posted: Fri Dec 05, 2003 7:12 pm
by s_reynisson
Using POSIX regular expression:
find (.{80})\n
replace \1

To use POSIX goto Configure->Preferences->Editor
and tick the "Use POSIX regular expression syntax" box.
In the replace dialog tick the "Regular expression" box.

HTH

Posted: Fri Dec 05, 2003 9:30 pm
by Michael Cook
Thank you.
It worked very fast. Much faster than a ms Word script I have been using.
:D