Uniform CRLF

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Wayne Leone

Uniform CRLF

Post by Wayne Leone »

Newbee question. I've opened a file with a CRLF at the end of each row of text. However, since the text is not uniform, the CRLF end in various column's. I want the CRLF to end at the same column in each row. What's the best way to make this happen?
Ed

Re: Uniform CRLF

Post by Ed »

Assuming you want to pad the end of each row with spaces and that you know the length of the longest line (say 80)
save a line of 80 spaces on the clipboard
substitute
^\(.*\)$
with
\1\p
With the "Regular expression" box checked
substitute
^\(.\{80\}\).*$
with
\1

Ensure that under Configure/Preferences/"Document Classes"/Default/"Strip trailing spacess..." is not checked
Post Reply