Re: eregi filter
| From: | John W. Holmes | Date: | Wed, 19 Nov 2003 03:43:28 +0000 |
| Subject: | Re: eregi filter | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170236@lists.php.net to get a copy of this message | ||
Derek Ford wrote:
Erin wrote:So "aaaaa" is a good password? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.comAnyone have a good eregi filter for passwords? well, for one thing, don't use ereg. Use pcre, as it is faster. preg_match('/^[a-zA-Z0-9]{5,16}$/',$blah); that will validate a password containing only upper or lowercase letters and numbers, between 5 and 16 characters.