preg_match_all('/x[A-Z]+\d/', $str, $matches, PREG_SET_ORDER);
print_r(end($matches));或
$expr = "#<a href=\"(.*)\">IMDB link</a>#"; @preg_match_all($expr, $html, $arr2, PREG_SET_ORDER); $IDMBLink = end($matches)[1];$ 倒叙搜索不管用
本文介绍了如何使用PHP中的正则表达式进行字符串匹配,包括preg_match_all函数的使用方法,并提供了具体的代码实例。
preg_match_all('/x[A-Z]+\d/', $str, $matches, PREG_SET_ORDER);
print_r(end($matches));或
$expr = "#<a href=\"(.*)\">IMDB link</a>#"; @preg_match_all($expr, $html, $arr2, PREG_SET_ORDER); $IDMBLink = end($matches)[1];$ 倒叙搜索不管用
4万+
806
1477
295

被折叠的 条评论
为什么被折叠?
