How to replace unicode character u00A0 with a space in JavaScript

1 Answer

0 votes
let str = "\u00A0\u00A0javascript\u00A0\u00A0";

str = str.replace(/\u00A0/, "").trim();

console.log(str);
 
 
 
/*
run:
 
"javascript"
 
*/

 



answered Nov 26, 2022 by avibootz
...