87,997
社区成员




var sToMatch = "abcde";
document.write(sToMatch.replace(/.+/gi,"*") + " <br>"); //输出:*
document.write(sToMatch.replace(/a*/gi,"*") + " <br>"); //输出:**b*c*d*e*
var sToMatch = "";
document.write(sToMatch.replace(/.+/gi,"*") + " <br>"); //输出:
document.write(sToMatch.replace(/.*/gi,"*") + " <br>"); //输出:*