Extracting or Removing Certain Lines



  • Ok, so I’m not using NPP for programming. I’m using it to edit large txt files with thousands of lines of data. Here is what I need to do. I have a document where most of the lines contain the term NATIVE. I need to find a way to remove them or only show the lines that don’t contain the term NATIVE. I can do a find for all the lines that have NATIVE and copy them to another document but that doesn’t really help because it doesn’t remove them from the current document. I can copy the NATIVE lines to another document and compare it to the original and it shows me the lines I need extracted but I don’t see a way to select just the green lines and copy and paste them into a new document. I could manually bookmark each green line and then copy them but the problem with that is we’re talking about 25,000 lines. I can’t do that manually

    Basically does anyone have an idea on how I can get just the lines I need out of this document? It would be great if I needed the NATIVE lines but I need the ones that don’t have that term. Is there a way to do an inverse search and have it report items that don’t contain the specified term? Anyway. Any help or suggestions would be greatly appreciated. Thanks.



  • Hello @Brett-Welaj

    use find dialog->mark tab
    check bookmark lines
    find your NATIVE with mark all
    Close window
    Goto search->bookmark and choose cut bookmarked lines

    Cheers
    Claudia



  • I didn’t see that! That’s exactly what I needed! Thank you.


Log in to reply