Page 1 of 1

delete lines containing-delete lines except those containing

Posted: Wed Apr 14, 2010 12:47 am
by w7my@yahoo.com
I used to have an editor on an old Macintosh that had these features unfortunately I have not found a Windows text editor that has these two.

These features are really useful and would really like to see them in Textpad.

Posted: Wed Apr 14, 2010 2:06 pm
by ben_josephs
To delete lines containing stuff:

Search | Replace... (<F8>):
Find what: .*stuff.*\n
Replace with: [nothing]

[X] Regular expression

Replace All
or

Search | Find... (<F5>):
Find what: stuff

[X] Regular expression

Mark All
Edit | Delete | Bookmarked Lines


To delete lines not containing stuff:

Search | Find... (<F5>):
Find what: stuff

[X] Regular expression

Mark All
Search | Invert All Bookmarks
Edit | Delete | Bookmarked Lines