日期:2014-05-17 浏览次数:20696 次
<?php
$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);