note 40252 deleted from function.setcookie by tularis

From: Date: Sun, 02 Jan 2005 14:17:59 +0000
Subject: note 40252 deleted from function.setcookie by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-82580@lists.php.net to get a copy of this message
Note Submitter: nick at acresource dot com ---- For those of you who wish to have their user's use a more complicated password, this regular expression makes sure they use at least one number, one lowercase letter, and one uppercase letter. This may be inconvenient for your users, but it will provide a secure ground for md5 hash. <?php $string = "banana"; if (!preg_match('/^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$/', $string)) { echo "That is not a valid password."; } else { echo "That is a valid password."; } ?> Enjoy.

« previous php.notes (#82580) next »