I'm not a new member actually, join this forum last year but being passive all time, for some reason I can't login even though I have requested a new password.
Okay. get to the point.
this is my pattern :
Code: Select all
$pattern = "/^[1-5]([1-5[:alpha:]\*\$){4,14}[1-5]$/";1. First and last character must be integer
2. Password must be between 6 and 16 characters long.
3. Acceptable character are alpha characters and number 1 - 5
4. Must at least contains one instance of * and $
With the pattern above I manage to get 1st, 2nd, 3rd condition, but fail in 4th condition.
The preg-match() will return true though no * or $ is entered.
Can anybody help with this?
Thanks a lot
Cheers
Kal