Regular Expression help needed
I am trying to validate a password by using a regex.
* Must be between 6 to 16 characters long
* Must contain atleast 1 uppercase letter
* Must contain atleast 1 lowercase letter
* Must contain atleast 1 numeric "digit"
So far so good ...
Code:
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,16})$
* I am stuck here! Can optionally have any number of special characters listed below Any help would be greatly appreciated.
Cheers :)
Re: Regular Expression help needed
Re: Regular Expression help needed
Never been too good with RegEx, but with all those conditions, maybe a nested IF structure would be better. It would allow you to narrow down to the reason the password condition wasn't met. With a single Regex, all you'll be able to do is "if regex=met then good, else not good". That doesn't tell you WHY it failed though.