php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17901 bug in the function eregi()
Submitted: 2002-06-21 11:13 UTC Modified: 2002-06-21 12:21 UTC
From: akesla at gmx dot de Assigned:
Status: Closed Package: Regexps related
PHP Version: 4.1.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: akesla at gmx dot de
New email:
PHP Version: OS:

 

 [2002-06-21 11:13 UTC] akesla at gmx dot de
// this is a test string i used
$value="i|s:24:\"Hallo Dies Ist Ein TTTst ZZZ rrr\"";

// this is the regular expression string
$s="^([a-z_]{1,})\|([a-z]{1}):([0-9]{1,}):\"(.*) (.*) (.*)\"";

eregi($s,$value,$werte);
echo "sizeof($werte): "sizeof($werte);

foreach($werte as $f) {
    echo $f."<br>";
}

// OUTPUT
sizeof($werte): 10
i|s:24:"Hello this Is A Test ZZZ rrr"
i
s
24
Hello this Is A Test
ZZZ
rrr


the is the size of the array
the size is not scaleable its fix
the size is always 10
if i use another regular expression like
$s="^([a-z_]{1,})\|([a-z]{1}):([0-9]{1,}):\"(.*) (.*) (.*) (.*) (.*) (.*) (.*)\"";
the last "rrr" is not a value of the result

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 12:21 UTC] sander@php.net
This should be fixed in CVS. Try a snapshot from http://snaps.php.net and reopen this report if the problem persists.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 03:01:27 2024 UTC