正则匹配指定长度的数字要怎么写?
$str=12345678901234567890123 0987654321 3210987654321 1324354657 1324354657689 htm; preg_match('/([\d]{10})/',$str,$match); print_R ($match[1]);
------解决方案--------------------PHP code
12345678901234567890123 0987654321 3210987654321 1324354657 1324354657689 htm; preg_match_all('/([\d]{10}\b)/',$str,$match); print_R ($match[1]);
------解决方案--------------------PHP code
preg_match_all('/(\d{10}\b)/',$str,$matchs); print_r ($matchs);
------解决方案--------------------
把函数改成 preg_match_all 就行了
preg_match_all('/([\d]{10})/',$str,$match);
已抢66403个
抢已抢36869个
抢已抢20445个
抢已抢2508个
抢已抢18931个
抢