You need to escape the .
because it has the meaning of “an arbitrary character” in a regular expression.
mystring = mystring.replace(/\./g,' ')
You need to escape the .
because it has the meaning of “an arbitrary character” in a regular expression.
mystring = mystring.replace(/\./g,' ')