I\'m trying to do replace in JavaScript using:
r = \"I\\nam\\nhere\"; s = r.replace(\"\\n\",\" \");
But instead of giving me
Just use \\\n to replace it will work.
\\\n
r.replace("\\\n"," ");
The solution from here worked perfect for me:
r.replace(/=(\r\n|\n|\r)/gm," ");