PHP 4.0 Bug #8129 Updated: ereg returns incorrect results

From: Date: Tue, 05 Dec 2000 23:22:59 +0000
Subject: PHP 4.0 Bug #8129 Updated: ereg returns incorrect results
Groups: php.dev 
Request: Send a blank email to php-dev+get-40179@lists.php.net to get a copy of this message
ID: 8129 Updated by: zak Reported By: scion@webrelay.net Status: Open Bug Type: Regexps related Assigned To: Comments: 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]'? Previous Comments: --------------------------------------------------------------------------- [2000-12-05 18:15:36] scion@webrelay.net <?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

« previous php.dev (#40179) next »