quantifiers not working in ereg.*
| From: | matze | Date: | Sun, 25 May 2003 12:42:47 +0000 |
| Subject: | quantifiers not working in ereg.* | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148909@lists.php.net to get a copy of this message | ||
on a redhat 8.0 box with php 4.1.2 rpm (from rh v7.2) installed
the ereg.* functions don't work as i expect. in some cases -
especially when "\r\n" sequences are involved - the ereg functions
don't match a string, although they should. i tested with the same
code on several machines, it works fine on all, only the above
mentioned redhat box causes problems:
$foo ="barB\r\nfoo\r\n";
if(ereg(".+\r\nfo", $foo))
{
print('matched');
}
else
{
print('not matched');
}
i expect the output 'matched', and actually i get it on all machines
but the redhat box.
any idea what could be the reason for this behaviour?
/matze
--
( ( ( i ) ) ) http://barcelona.indymedia.org ( ( (
i ) ) )
* using free software / Debian GNU/Linux | http://debian.org *
gpg --keyserver keys.indymedia.org --recv-keys B9A88F6F
"La guerra es un acto abominable en el que se matan personas que no
se conocen, dirigidas por personas que se conocen y no se matan"