From: torke at lagged dot ca Operating system: Slackware Linux (2.4.18) PHP version: 4.3.4 PHP Bug Type: Regexps related Bug description: "?" repetition operator causing REG_BADRPT
Description: ------------ Using an expression such as ".*?" causes unwelcome results. When the code below is put through a validator (http://regexlib.com/RETester.aspx) the regular expression matches the text correctly. Configure Command './configure' '--prefix=/usr' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mod_charset' '--enable-force-cgi-redirect' '--enable-discard-path' '--with-config-file-path=/usr/local/apache/conf' '--enable-safe-mode' '--with-openssl' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--enable-dbase' '--enable-ftp' '--with-gmp' '--with-mysql=/usr/local/mysql' '--with-xml=shared' '--with-readline=/usr' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--enable-memory-limit' '--with-tsrm-pthreads' '--enable-shared' '--disable-debug' '--with-zlib=/usr' '--enable-exif' '--enable-xml' '--with-expat' '--with-imap=/usr/local/imap-2002b' '--with-mcrypt' '--with-gd' '--with-snmp' Reproduce code: --------------- <? echo eregi("[EMAIL PROTECTED]","[EMAIL PROTECTED]"); ?> Expected result: ---------------- That eregi example should return TRUE. -- Edit bug report at http://bugs.php.net/?id=26573&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26573&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26573&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26573&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26573&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26573&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26573&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26573&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26573&r=support Expected behavior: http://bugs.php.net/fix.php?id=26573&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26573&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26573&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26573&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26573&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26573&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26573&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26573&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26573&r=float