Remove or replace LF from CSV file

I have huge csv files where sometimes lines end in LF instead of CRLF , that is:

 pippo LF pluto CRLF 

I would have a line like pippo pluto CRLF

I am trying to use notepad ++ under Windows 7, but I cannot do this ...

+6
source share
3 answers

For this:

 Ctrl+F Go to "Reaplace" tab In "Find What" paste: ([^\r])\n In "Replace with" paste: \1 Choose "Regular expression" in "Search Mode" Replace All 
+7
source

From the Edit menu, select Convert Line and Convert To Windows Format (CRLF).

NB: I'm not really sure about the shortcuts because I don't have the English version of Notepad ++.

Notepad ++ menus evolve from version to version. In the English version of Notepad ++ 6.3.2, on the Modify menu, select EOL Conversions => Windows Format .

+3
source

Just replace all \r with "" .

For this:

  • Ctrl+F
  • Click on the "Reaplace" tab.
  • In the Find What panel: \r
  • In "Replace with" paste: ""
  • Select "Extended" in "search mode"
  • Replace all
+1
source

Source: https://habr.com/ru/post/954143/


All Articles