Page 1 of 1

Extract lines without deleting remainder

Posted: Mon May 04, 2015 10:39 am
by simoninsing
Struggling to find a way to extract lines from a file by reference to a pattern match, WITHOUT deleting the remaining lines. I want to send the extractions to different files. Extract lines and Remove lines seem to work by nuking what is left. For example, I have a file that has this contents
12345
123
333345
333345
65777
897777
934444
So I want an extraction function that first takes all lines beginning with "1" to "1.txt"
Then an extraction function will take all lines beginning with "3" to 3.txt
and so on.

Re: Extract lines without deleting remainder

Posted: Sun May 10, 2015 9:13 pm
by DataMystic Support
Easy - use a Filters\Restrict\Restrict to lines matching pattern list.

And inside this, put a Filters\Special\Secondary output filter

The original text will flow on unchanged, with matching text pushed out to the new file.

Re: Extract lines without deleting remainder

Posted: Sun May 10, 2015 11:53 pm
by simoninsing
Got it, thanks Simon