From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.1.2 PHP Bug Type: *Regular Expressions Bug description: ereg doesn't match on Alpha but does on i586
I was trying a set of scripts on my alpha intead of the i586 I used before (same php version same configure options). I had some problems and found it had something to do with weird behaviour of ereg. It doesn't match in some cases where it should (and does on i586), the matches array is left empty. Some examples: $p="blah link website bluh"; ereg("(.*)bla(.*)lin(.*)uh",$p,$regs1); //OK isset($regs1) and print(implode("<br>",$regs1)); ereg("(.*)bla(.*)lin(.*)web(.*)uh",$p,$regs2); //NOT OK isset($regs2) and print(implode("<br>",$regs2)); ereg("bla(.*)lin(.*)web(.*)uh",$p,$regs3); //NOT OK isset($regs3) and print(implode("<br>",$regs3)); ereg("bla(.*)lin(.*)uh",$p,$regs4); //OK isset($regs4) and print(implode("<br>",$regs4)); So only examples 1 and 4 have output. I can't find a real patern in it.. I hope you can.... Tim XXXXXXXXXXX Compile options (I got from debian): '../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs' '--with-regex=system' '--with-config-file-path=/etc/php4/apache' '--disable-rpath' '--disable-debug' '--enable-memory-limit' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db2' '--with-iconv' '--with-ndbm' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-xml=/usr' '--with-expat-dir=/usr' '--enable-yp' '--with-zlib' '--without-pgsql' '--disable-static' '--with-layout=GNU' '--with-curl=shared,/usr' '--with-dom=shared,/usr' '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr' '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-recode=shared,/usr' '--enable-xslt' '--with-xslt-sablot=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' '--with-t1lib=shared,/usr' -- Edit bug report at http://bugs.php.net/?id=15996&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15996&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15996&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15996&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15996&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15996&r=support Expected behavior: http://bugs.php.net/fix.php?id=15996&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15996&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15996&r=submittedtwice