Delete lines: .csv file in Notepad++

acred Posted messages 1 Status Member -  
Reivax962 Posted messages 3742 Status Member -
Hello,

I want to delete all lines containing specific dates from my .csv file in Notepad++.
Then I want to process my file in Excel,
I must absolutely perform this step because my file contains a number of lines that Excel cannot handle.

Thank you.

1 answer

  1. Reivax962 Posted messages 3742 Status Member 1 011
     
    Hello,

    When I have to do this kind of thing in NotePad++, I follow the following procedure, for example for the date
    20/04/2018

    -> ctrl + H
    -> check "regular expression"
    -> In the Search field, put:
    ^.*20/04/2018.*$

    -> Remove everything in the Replace field
    -> Click on Replace All

    This will remove all lines that contain 20/04/2018. Note that you can also go line by line, for more security, using "Replace" instead of "Replace All"

    Then, you need to delete the empty lines. For that, my technique is as follows:
    -> ctrl + H
    -> check "Extended mode"
    -> In the Search field, put:
    \r\n\r\n

    -> In the Replace field, put:
    \r\n

    -> Click on Replace All as many times as needed (stop when it says "0 occurrences have been replaced")

    It's a bit artisanal, but it's my technique ^^

    Xavier
    0