//请修改变量p的正则表达式,使他能够匹配str中的姓名 $p = '/name:([\w\s]+)/'; $str = "name:steven jobs"; preg_match($p, $str, $match); print_r($match);
Array ( [0] => name:steven jobs [1] => steven jobs ) //??????
2024-01-06 10:12:46
//请修改变量p的正则表达式,使他能够匹配str中的姓名 $p = '/name:([\w\s]+)/'; $str = "name:steven jobs"; preg_match($p, $str, $match); print_r($match);
Array ( [0] => name:steven jobs [1] => steven jobs ) //??????