this is my javascript code:
mystring = "this is sample";
nestring = mystring.replace(/ /g," ");
I need nestring ouput “this is sample”.
but with the code above, nestring = "this is sample"
how can I replace space( ) with  ( )?
Many thanks!
re:
I embed svg in html. But ie, chrome do not support xml:space=preserve, firefox does. By replace ” ” with  , multiple ” ” will not condense to one ” “.
You could use the Unicode:
But your example did exactly what you told it to.