I have a text in a textarea and I read it out using the .value attribute.
Now I would like to remove all linebreaks (the character that is produced when you press
This will replace the line break by empty space.
someText = someText.replace(/(\r\n|\n|\r)/gm,"");
Read more on this article.