I need some help with a RegEx. I am using ColdFusion 8. Ultimately, I need to validate new and changing passwords to meet The Enterprise's password complexity requirements. I have two web forms - one for new users, and another for existing users to reset their passwords. For both forms I will be using server-side validation on post. I need a regular expression that validates according to the following rules:
Passwords must be at least 7 characters and contains characters from 3 of the following four character type groups:
Upper Case Letters: A B C...
Lower Case Letters: a b c...
Numbers: 1 2 3...
Special Characters/Symbols: ` ~ ! @ ## $ % ^ & * ( ) _ + - = { } | \ : " ; ' < > ? , .
I would like to use one regular expression to do this, but I'm not against writing CF logic to accomplish the same thing. It seems like the 3 out of 4 bit would be pretty complex. But for as much as I know about Regular Expressions, it might not be.
Thanks so much for your help.
-Jonathan