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
var str = "bar\r\nbaz\nfoo"; str.replace(/[\r\n]/g, ''); >> "barbazfoo"