Forum Discussion
Are you seeing an error message? Since you’re using quotes and the column is quoted, the CSV Parser should treat the carriage return as part of the column’s value and not as a row delimiter. Is it possible the quoting is off?
Doh – also messed up with the expression I gave you.
$content.toString().replace('\r', ' ')
Only replaces the first match. You should probably use replaceAll
or change the regular expression to /\r/g
. This will replace all carriage returns, so if the lines are delimited with \r\n
, then you’d have to use something like /\r(?!\n)/g
, which would remove all carriage returns not followed by a line feed.