$string = 'caoyang@sina.com'; // 匹配@之后的部分 $preg = '/(?<=@).*/'; $status = preg_match_all($preg, $string, $matches); echo $status; var_dump($matches);