This is my statement one.\\n This is my statement2 This is my stateme
My .replace()function using the patterns described on the other answers did not work. The pattern that worked for my case was:
.replace()
var str = "Test\n\n\Test\n\Test"; str.replace(/\r\n|\r|\n/g,' '); // str: "Test Test Test"