Write a PHP program that checks the elements of a string array
named $Passwords. Use regular expressions to test whether each ele-
ment is a strong password.
For this exercise, a strong password must have at least one number,
one lowercase letter, one uppercase letter, no spaces, and at least one
character that is not a letter or number. (Hint: Use the [^0-9A-Za-z]
character class.) h e string should also be between 8 and 16 charac-
ters long.
I've done so far :
/([0-9]+)([A-Z]+)([a-z]+)([^0-9A-Za-z]+)(^\s)/
for upper and lower case digit and non-digit nor character...
how can I do about the minimum and maximum length, and also how can I make the search order doesn't matter...
can this excercice be done just by using one line of regex ? or I have to include separate searches ?