php 正则匹配返回字符串 $pattern = '/(title-.+)&/U'; $keyword = preg_match($pattern,$key,$dir); $dir 是返回的匹配到的数组