preg_match_all find only the firt occurence

£可爱£侵袭症+ 提交于 2019-12-13 05:36:52

问题


I created this regexp but finds only the first occurrence, where am I wrong?

$pattern = '/\\[h-imagegallery id=([0-9,]+)\\]/';
$subject = 'ueihui [h-imagegallery id=4,55] jwff [h-imagegallery id=425]';    

print_r($matches);

the result is:

Array ( [0] => [h-imagegallery id=4,55] [1] => 4,55 )

来源:https://stackoverflow.com/questions/19236653/preg-match-all-find-only-the-firt-occurence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!