I have a javascript string containing 3 zero-width space.
https://jsfiddle.net/cmedina/pe1jup8a/
4 returns when var.length use.
My question is how can I delete the zero-width space to be able to compare
"." === "."
and return true.
in JavaScript remove ZERO WIDTH SPACE (unicode 8203) from string
I found a solution, but is not valid for this, I try
var a =".";
var b = a.replace(/\u200B/g,'');
var c = a.replace(/\u200B/g,'');
console.log(a.length);
console.log(b);
console.log(c.length);
but always returns 4 characters.