I have a text file that is | delimited and is over 59,000 line long. How can I remove the carriage returns so each line is one record?
Here is what the current file looks like:-
Here is what I need it to look like:-
Any help would be awesome
Do a regular expression find/replace like this:
[^|\n\r]\R
\1
It matches OS-linebreaks (\R
) that are not (^
) preceded by a |
or \r
or \n
. Should work with any EOL convention.
In notepad++, you can actually open the search box, check the option for "extended search" in the search mode, and replace \R
with blanks. This will help you replace the carriage return characters...
This also works for the other special chars such as \t
, \n
, etc.