Search code examples
text-extractionemeditor

Emeditor : When using the extract feature : how to also remove the extracted contents (rows) from the source document?


Example : the file "A.txt" contains several rows with phrases :

This is a phrase
Bla keyword blabla
This is another phrase

Desired results :

in A.txt :

This is a phrase
This is another phrase

in B.txt :

Bla keyword blabla

Then I use the option "Find" keyword then I use "Extract". It extracts the correct rows in a new document (B.txt) but how to also remove the full row(s) containing the selected keyword in "A.txt" ?


Solution

  • This can be easily done with EmEditor. I have provided two methods.

    Method 1

    1. Select a keyword, right-click on the selection, and select Filter Out.

    Filter Out

    1. Click Extract All on the Filter toolbar.

    Extract All

    1. Save as a new file name.

    Method 2

    1. Select a keyword, right-click on the selection, and select Filter.

    2. Make sure Block Multiline Changes is disabled on the Filter toolbar.

    3. Press Ctrl + A to select all text.

    4. Press Delete.

    5. Click the Abort button on the Filter toolbar.