literal dot regex code example Example: regular expression replace a dot mystring = mystring.replace(/\./g,' ')