如何将4个扩展名与regexp匹配?
我累了这个:
$returnValue = preg_match('/(pdf|jpg|jpeg|tif)/', 'pdf', $matches);
我不知道为什么我得到2场比赛?我是regexp中遗漏的东西吗?
array ( 0 => 'pdf', 1 => 'pdf', )
php regex
php ×1
regex ×1