From:             [EMAIL PROTECTED]
Operating system: Linux Red HAt 7.1
PHP version:      4.1.2
PHP Bug Type:     *Regular Expressions
Bug description:  Problem with ereg

Since I have been using php I have had a problem with the ereg function not
mathcing patterns properly.

For example I am trying the use ereg to ensure that users use passowrds
that contain a combination of letters and numbers.

These are my HTML and PHP codes:

<input type="password" name="password">

if(!ereg("([a-zA-Z0-9])", "$password")){
   echo "Bad Password";
}

The problem that I encounter with ereg is that I have been able to enter
passwords from the html form that do not contain numbers and or only have
mixed case letters but ereg IF statment does match the pattern and echo
"Bad Password".
-- 
Edit bug report at http://bugs.php.net/?id=16358&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16358&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16358&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16358&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16358&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16358&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16358&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16358&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16358&r=submittedtwice

Reply via email to