为什么$match[1]的值是:steven jobs
$p = '/\w+:(\w+\s\w+)/';
$str = "name:steven jobs";
preg_match($p, $str, $match);
echo $match[1]; //结果为:steven jobs
print_r($match);
$p = '/\w+:(\w+\s\w+)/';
$str = "name:steven jobs";
preg_match($p, $str, $match);
echo $match[1]; //结果为:steven jobs
print_r($match);
2017-06-05
举报