Assuming that we have this variable string
const str = "address2\r\nmultiple1,\"my address row 1\nmy address row 2\",12345,\"my address 22222 row 1\nmy address 2222 row 2\"\r\n"
How to remove all the \n
that is within the character \"
?
Maybe through a regex?
Expected Output should be
str = "address2\r\nmultiple1,my address row 1 my address row 2,12345,my address 22222 row 1 my address 2222 row 2\r\n"