I would like the replace all the spaces in my project. And my project has many \n. But when I replace the space, and the \n be replaced at the same time.
For example
var s = '1\n';
var re = s.replace(/\s/g,"**");
console.log(re); //1**
I don't expect this result