Why does this piece of code :
<?php
$string = "55=abc:56=def:57=ghi:";
$pattern = "(([0-9])=([a-z]{1,3})🙂";
$match = eregi($pattern, $string, $matches);
while(list($index, $value) = each($matches)) {
echo "|$index|$value|<br>\n";
}
?>
.. return this :
|0|55=abc:56=def:57=ghi😐
|1|57=ghi😐
|2|57|
|3|ghi|
|4||
|5||
|6||
|7||
|8||
|9||
.. and not all three matches ( 55=abc: , 56=def , 57=ghi ) ?
I know it could be done in other ways, but I guess I'm just having a plain REGEX-missunderstanding.