string newPassword = Membership.GeneratePassword(15,0); newPassword = Regex.Replace(newPassword,@"[^a-zA-Z0-9]",m => "9" );
此正则表达式将用数字字符9替换所有非字母数字字符。