Community
    • 登入

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

    已排程 已置頂 已鎖定 已移動 General Discussion
    3 貼文 2 Posters 5.0k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Vic PaineV
      Vic Paine
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Scott SumnerS
        Scott Sumner @Vic Paine
        最後由 編輯

        @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 條回覆 最後回覆 回覆 引用 1
        • Vic PaineV
          Vic Paine @Scott Sumner
          最後由 編輯

          @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 條回覆 最後回覆 回覆 引用 0
          • 第一個貼文
            最後的貼文
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors