Regular expression notation table for spaces
\x20 โ standard space โ\sโ
\xC2\xA0 โ โ โ
\x0D - โ\rโ
\x0A โ new Line or โ\nโ
\x09 โ tab or โ\tโ
JS table designation:
String.fromCharCode(160) -
Now use it to replace all your characters, add more if you want to delete a new line or carriage return
var re = '/(\xC2\xA0/| )';
x = x.replace(re, ' ');
you can also use
var re = '/(\xC2\xA0/| )';
x = x.replace(re, String.fromCharCode(160));
www.rubular.com