I want to make sure my users passwords contain at least one, a-z, one A-Z, one 0-9 and one special character.
I thought the best way of doing this would be to set variables like this:
$lower_list = 'abcdefghijklmnopqrstuvwxyz';
$upper_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$numbers_list = '0123456789';
$special_list = '!"£$%^&*(){}[]=-`¬¦\|/?.>,<#~\'@;:*-+';
Whats the function I need? Or is there a better way of doing it? I know I could use preg_match but I have no idea how to write the regex.