المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Regular expression to check special character



C# Programming
09-09-2011, 11:31 AM
I need to check whether password has at least 6 characters with at least 1 letter and one special character. I am checking the condition !Regex.IsMatch(strPassword,"(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,24})$"). But it doesnot allow special character.

I need to change the expression to check if there is at least one special character.

Please help me out.