iou-4631219013305ts php正则匹配得到4631219013305
你可以使用以下正则表达式进行匹配:
$pattern = '/\d+/';
$str = 'iou-4631219013305.ts';
preg_match($pattern, $str, $matches);
echo $matches[0]; // 输出:4631219013305
这个正则表达式 \d+ 表示匹配一个或多个数字。使用 preg_match 函数可以将匹配的结果保存在 $matches 数组中,然后通过索引取得匹配的结果。
原文地址: https://www.cveoy.top/t/topic/iqUW 著作权归作者所有。请勿转载和采集!