Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Delete all lines contain word "sil"

2. Help
Asma
2013-10-11
2013-10-17
  • Asma
    Asma
    2013-10-11

    Hello

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

    For example, the file contains:
    "'*'/01_2.lab"
    0.013750 125 sil
    0.173750 125 S

    I need to make it like:
    "'*'/01_2.lab"
    0.173750 125 S

    Note: without remaining blank line.

    Thank you

     
  • THEVENOT Guy
    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 )

    Cheers,

    guy038

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

    I appreciate your cooperation.

    Thank you sooo much ( :