|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14267 Ereg doesn't work on following
Submitted: 2001-11-28 10:14 UTC Modified: 2001-11-28 10:24 UTC
From: tonda at kmoch dot cz Assigned:
Status: Closed Package: *Regular Expressions
PHP Version: 4.0CVS-2001-11-28 OS: Linux Redhat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tonda at kmoch dot cz
New email:
PHP Version: OS:


 [2001-11-28 10:14 UTC] tonda at kmoch dot cz
   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 2.2.17-8smp #1 SMP Fri Nov 17 16:12:17


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-28 10:24 UTC]
This works for me (on both 4.1.0RC3 and 4.2.0dev):

    $login = "blact";
    if (Ereg("^[a-zA-Z0-9_]{1,8}$", $login)) {
        echo "OK";


Please try the latest RC from and reopen if you still have the problem. However, I don't think this is a bug in PHP, but rather in your code.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 08:01:28 2024 UTC