id=1&key=20230801_4631219013305ts php正则匹配得到20230801_4631219013305
可以使用以下正则表达式来匹配得到"20230801_4631219013305":
$str = "?id=1&key=20230801_4631219013305.ts";
$pattern = "/key=(\d+_\.ts)/";
preg_match($pattern, $str, $matches);
$result = $matches[1];
echo $result;
输出结果为:20230801_4631219013305
原文地址: https://www.cveoy.top/t/topic/iqUw 著作权归作者所有。请勿转载和采集!