ID: 8129 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Bogus Bug Type: Regexps related Assigned To: Comments: the script is buggy: ereg($e, $regexp) should be ereg($regexp, $e) --Jani Previous Comments: --------------------------------------------------------------------------- [2001-01-08 18:47:32] [EMAIL PROTECTED] Is this bug still present in php-4.0.4? --------------------------------------------------------------------------- [2000-12-05 18:22:59] [EMAIL PROTECTED] The same code works as expected for me - and I have used similar code on oBSD. Please doublecheck your code. Perhaps the regex is actually '[^a-z]'? --------------------------------------------------------------------------- [2000-12-05 18:15:36] [EMAIL PROTECTED] <?php $str[] = "Makefile"; $str[] = "makefile"; $str[] = ".."; $str[] = "X-picturev"; $regexp = "^[a-z]"; while ( list( $key, $e) = each($str) ){ if( ereg( $e, $regexp)) echo "$e is lower<br>"; else echo "$e is UPPER<br>"; } ?> confugured --regex=pcre http://tbiz.webrelay.net/test/ereg.php will illustrate the bug and show phpinfo(); Also php4.0pl1 with OpenBSD with -regex=php will behave similarly. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8129 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]