I want to validate a password using regular expression in c#.
These are the conditions :
Give this a whirl
^(?i)(?=.*[a-z])(?=.*[0-9])(?=.*[@#_])[a-z][a-z0-9@#_]{6,}[a-z0-9]$
Fits your specification I believe. From the look of your current regex youll be able to understand it but if not comment and ill explain.