$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 '没有匹配到';
}
?>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
this后面加个空格,或者thisartrapple改为artrapplethis