php.net |  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:
MUST BE VALID
Solve the problem:
4 + 26 = ?
Subscribe to this entry?

 
 [2001-11-28 10:14 UTC] tonda at kmoch dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-28 10:24 UTC] derick@php.net
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC