Hi all,
I've come across an oddity with ereg(). I'm using PHP 4.2.1.
if (ereg ("(files[[0-9]])(.)([[:alnum:]])([[:space:]]=[[:space:]]new)(.*)", $s, $regs)) {
foreach ($regs as $value) {
print $value ."<br>";
}
}
One of my key needs is to match 'the rest' (.*) of the string and store it in the array. This DOES work with the above code.
But oddly, if the entire string is matched in that way, then the first element in the array does not contain the first subgroup but rather the entire string. That's ok - I just want to make sure that it is the expected behaviour. Could someone please confirm this?
Thanks in advance,
Juergen