Bug #17901 Updated: bug in the function eregi()
| From: | sander@php.net | Date: | Fri, 21 Jun 2002 16:21:24 +0000 |
| Subject: | Bug #17901 Updated: bug in the function eregi() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11697@lists.php.net to get a copy of this message | ||
ID: 17901
Updated by: sander@php.net
Reported By: akesla@gmx.de
-Status: Open
+Status: Closed
Bug Type: Regexps related
Operating System: Linux
PHP Version: 4.1.2
New Comment:
This should be fixed in CVS. Try a snapshot from http://snaps.php.net
and reopen this report if the problem persists.
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 11:13:22] akesla@gmx.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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17901&edit=1