#47656 [NEW]: preg_match doesn't match certain string length

From: Date: Sat, 14 Mar 2009 11:43:57 +0000
Subject: #47656 [NEW]: preg_match doesn't match certain string length
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134693@lists.php.net to get a copy of this message
From: bugs at no-signal dot com Operating system: Linux PHP version: 5.2.9 PHP Bug Type: PCRE related Bug description: preg_match doesn't match certain string length Description: ------------ preg_match will match against 'ourproducts/documentaries/test12345.html' but not against 'ourproducts/documentaries/test123456.html' preg_match_all does return the expected result, however. Reproduce code: --------------- $result = preg_match('#^((?:[^/]+/?)+)/(.*)$#i','ourproducts/documentaries/test123456.html',$matches); var_dump($matches); Expected result: ---------------- array(3) { [0]=> string(40) "ourproducts/documentaries/test123456.html" [1]=> string(25) "ourproducts/documentaries" [2]=> string(14) "test123456.html" } Actual result: -------------- array(0) { } -- Edit bug report at http://bugs.php.net/?id=47656&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47656&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47656&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47656&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47656&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47656&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47656&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47656&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47656&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47656&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47656&r=support Expected behavior: http://bugs.php.net/fix.php?id=47656&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47656&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47656&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47656&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47656&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47656&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47656&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47656&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47656&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47656&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47656&r=mysqlcfg

« previous php.bugs (#134693) next »