特殊字符正则表达式

不知道哪位高手能够一起改进这个特殊字符验证

if (Regex.IsMatch(txtPwd.Text, "[A-Za-z]+"))
                {
                    if (Regex.IsMatch(txtPwd.Text, "[0-9]+"))
                    {
                        if (Regex.IsMatch(txtPwd.Text, @"[-?!@#$%^&*()_+={}[]|/;:,./<>]+"))
                        {

                        }
                        //if (Regex.IsMatch(label4.Text, @"[!@#$%^&*()_+={}[]|/;:,./<>?]+"))
                        //{

                        //}
                        else
                        {
                            MessageBox.Show("密码必须是数字、字母、特殊字符的混合!");
                            txtPwd.Text = "";
                            txtPwdAgagin.Text = "";
                            return;
                        }

                    }
                    else
                    {
                        MessageBox.Show("密码必须是数字、字母、特殊字符的混合!");
                        txtPwd.Text = "";
                        txtPwdAgagin.Text = "";
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("密码必须是数字、字母、特殊字符的混合!");
                    txtPwd.Text = "";
                    txtPwdAgagin.Text = "";
                    return;
                }

你可能感兴趣的:(c#)