preg_match_all 执行一个全局正则表达式匹配

int preg_match_all('正则','$str');

//成功返回匹配到的数目,失败返回0

原文地址:https://www.cnblogs.com/xiongwei89/p/2992976.html