String.prototype.replaceAll = function (replaceThis, withThis) { var re = new RegExp(replaceThis,"g"); return this.replace(re, withThis); }; var aa = "abab54..aba".replaceAll("\\.", "v");
用这个测试 tool