首页 > 问答 > 正文
$zz = '/this\b/';
$string1 = "this is a apple";
$string2 = "thisis a apple";
$string3 = "thisartrapple";
if (preg_match($zz, $string3, $matches)) {
echo '匹配到了,结果为:';
var_dump($matches);
} else {
echo '没有匹配到';
}
?>
不用扶的阿斗2018-10-05 11:53:09
this后面加个空格,或者thisartrapple改为artrapplethis