28,391
社区成员
发帖
与我相关
我的任务
分享
With New RegExp
.Pattern = "^(.{2}).{3}"
str = .Replace(str, "$1***")
End With
String.prototype.replaceAll = function(s1,s2) {
return this.replace(new RegExp(s1,"gm"),s2);
}
var phoneStr = "8**2*31544";
phoneStr=phoneStr.replaceAll("\\*","");
alert(phoneStr);//8231544