Page 1 of 1

Enhanced Search/Replace, tagged text in search as well

Posted: Mon Nov 24, 2003 2:20 am
by David Morrison
Currently TextPad allows tagged text in search an replaces. This I use regularly to transform lines of texts.

However, I now need to process files which may have duplicate lines. For these lines I wish to tag them so that I can either delete all entries which are duplicated (that is delete both of them), or I may wish to delete everything which does not have a duplicate.

To do this I wanted to do the following search:

\(.*\)\n\1\n

Then I could select Mark-All.

I could use the same approach to remove duplicates (although this is already supported as an option on the Sort window) :

Search = \(.*\)\n\1\n
Replace= \1\n

This facility could also be used for other more complex types of searches.

Posted: Mon Nov 24, 2003 6:53 am
by CyberSlug
Well, on the TextPad menu you can go to:

Edit > Delete > Bookmarked lines
and
Search > Invert All Bookmarks