need some clarification with preg_match to match password
Posted: Sat Nov 29, 2014 4:54 pm
I am using this pattern I found in the search:
I keep getting result == false, and I cannot figure out how to match it properly.
I would also like to have it so you can use special characters like (.~!@#$%^&*), whether they are all upper case or all lower case or mixed it don't matter.
Anyhelp?
Code: Select all
$match_result = array();
$password = "time123456789";
$result = preg_match('/^([a-zA-Z0-9]{8,32})$/i', $password, $match_result);
I would also like to have it so you can use special characters like (.~!@#$%^&*), whether they are all upper case or all lower case or mixed it don't matter.
Anyhelp?