Community
    • Login

    I have txt file with [CR CR\LF] how do I remove CR\LF but leave first CR?

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 5.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Vic PaineV Offline
      Vic Paine
      last edited by

      This is a very large file (26515 lines) that has a blank line between every entry when loaded into a spreadsheet. I would like to remove the blank lines (redundant CR\LF) before loading into spreadsheet. I have tried find (without replacing) but however I enter the [\r\n] it always finds the single CR as well.

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS Offline
        Scott Sumner @Vic Paine
        last edited by

        @Vic-Paine

        Try:

        Find what zone: (\R)+
        Replace with zone: \1
        Search mode radio-button: Regular expression

        Translation: Match one or more adjacent line-endings…replace matches with simply a single line-ending.

        If this (or ANY posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

        Vic PaineV 1 Reply Last reply Reply Quote 1
        • Vic PaineV Offline
          Vic Paine @Scott Sumner
          last edited by

          @Scott-Sumner
          Thanks, worked a treat. Also found that if I opened it in Libre Office Writer and saved as *.csv it cleared unwanted blank lines as well.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors