|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-14 13:53 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
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) { }