how to squeeze multiple blank lines to one?

General questions about using TextPad

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

Post Reply
User avatar
GottaRun
Posts: 4
Joined: Fri Nov 06, 2009 6:30 am
Contact:

how to squeeze multiple blank lines to one?

Post by GottaRun »

I have documents with one or more blank lines scattered.
How do I squeeze it to a only one blank line?

Thank you very much for the assist.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Do you mean you want each run of consecutive blank lines reduced to a single blank line?

If the blank lines are empty,
Find what: \n\n\n
Replace with: \n\n

[X] Regular expression

Replace All -- do this repeatedly until it beeps
If the blank lines may contain spaces and tabs, you have to use
Find what: \n[ \t]*\n[ \t]*\n
User avatar
GottaRun
Posts: 4
Joined: Fri Nov 06, 2009 6:30 am
Contact:

Post by GottaRun »

cool. thank you.
Post Reply