Delete all lines contain word "sil"

  • Asma

    Asma - 2013-10-11


    I need to remove each line that contains the word "sil"

    For example, the file contains:
    0.013750 125 sil
    0.173750 125 S

    I need to make it like:
    0.173750 125 S

    Note: without remaining blank line.

    Thank you


    THEVENOT Guy - 2013-10-13

    Hello Asma,

    Pleased to chat with you, again !

    It's quite easy, with a Regular expression search, in N++ :

    • Open the Search/Replacement dialog ( CTRL + H ).

    • Type in .*sil.*\R in the Search field.

    • Leave EMPTY the Replacement field.

    • Set the Match case square box, if you like to.

    • Set the Wrap around square box.

    • Click on the Regular expression radio button.

    • Unset the .match newline square box, if necessary ( IMPORTANT )

    • Click on the Replace All button

    Et voilà !!!

    Notes :

    .*sil.* represents the string sil, both preceded and followed by any character, even none

    \R stands for any EOL ( \r\n in a Windows file, \n in an Unix file or \r in an old Mac file )



    Last edit: THEVENOT Guy 2013-10-13
  • Asma

    Asma - 2013-10-17

    I appreciate your cooperation.

    Thank you sooo much ( :