Find blank lines, delete same -- but only next instance.

General questions about using TextPad

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

Post Reply
User avatar
tcebob
Posts: 80
Joined: Fri Mar 28, 2003 1:20 am

Find blank lines, delete same -- but only next instance.

Post by tcebob »

This deletes all blank lines
find ^[-\t]*\n (- = blank)
repl with (nothing)

How to delete only the next group of blank lines (one ore more) -- Without highlighting first?

tcebob
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Next after what?

Do you want to replace a sequence of two or more blank lines by a single empty line? This will do that:
Find what: ^[ \t]*\n[ \t]*\n
Replace with: \n

[X] Regular expression
Replace All repeatedly until they're all done.
User avatar
tcebob
Posts: 80
Joined: Fri Mar 28, 2003 1:20 am

Post by tcebob »

Doesn't seem to work. Invalid regular expression. Copied right from the page.

tcebob
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

It works here. Please try again.
Post Reply