时间:2021-07-01 10:21:17 帮助过:11人阅读
$subject = "link/3445/65";
$pattern = '#link/?([0-9]*)/?([0-9]*)/?$#';
preg_match($pattern, $subject, $matches);
print_r($matches);
?>
$s = "link/3445/644445";
$reg = '/link\/([\d]*)\/([\d]*)$/i';
preg_match($reg, $s, $a);
print_r($a);