replace和replaceAll的兼容性问题 replaceAll的兼容性太差,可以用replace和正则相结合来代替replaceAll的使用。 如果不增加正则g关键字,则表示替换第一个匹配的字符串。