(PHP 4, PHP 5, PHP 7, PHP 8)
preg_match_all — 执行一个全局正则表达式匹配
说明
preg_match_all( string pattern, ...string subject, array &matches = null, int flags = 0, int
搜索subject中所有匹配pattern给定正则表达式 的匹配结果并且将它们以...flag指定顺序输出到matches中....在第一个匹配找到后, 子序列继续从最后一次匹配位置搜索.
参数
pattern
要搜索的模式,字符串形式。
subject
输入字符串。...>/";
preg_match_all($str_RE,$str,$arr,PREG_SET_ORDER);
print_r($arr);
echo "";
foreach