|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 16 = ?
Subscribe to this entry?

 [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: Mon Jul 22 00:01:28 2024 UTC