Bug #14267 Updated: Ereg doesn't work on following

From: Date: Wed, 28 Nov 2001 15:24:39 +0000
Subject: Bug #14267 Updated: Ereg doesn't work on following
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-71937@lists.php.net to get a copy of this message
ID: 14267 Updated by: derick Reported By: tonda@kmoch.cz Old Status: Open Status: Closed Bug Type: *Regular Expressions Operating System: Linux Redhat 7.1 PHP Version: 4.0CVS-2001-11-28 New Comment: This works for me (on both 4.1.0RC3 and 4.2.0dev): <?php $login = "blact"; if (Ereg("^[a-zA-Z0-9_]{1,8}$", $login)) { echo "OK"; } ?> output: OK Please try the latest RC from www.php.net/~zeev/ and reopen if you still have the problem. However, I don't think this is a bug in PHP, but rather in your code. Derick Previous Comments: ------------------------------------------------------------------------ [2001-11-28 10:14:15] tonda@kmoch.cz Dear PHP.net, i have this part of script: if (Ereg("^[a-zA-Z0-9_]{1,8}$", $login)) { .... . . And this doesn't work correctly on any string containing character 'c'. P.S. I am using PHP Version 4.0.4pl1 System: Linux porky.devel.redhat.com 2.2.17-8smp #1 SMP Fri Nov 17 16:12:17 ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14267&edit=1

« previous php.dev (#71937) next »