这两个字符串似乎是相同的。为什么正则表达式匹配一个而不是另一个?正则表达式不适用于某些字符串
$str1 = "NЕТ";
$str2 = "NET";
if (preg_match("/NET/",$str1)){
echo "Match string 1!";
}
else {
echo "Does not match string 1!";
}
if (preg_match("/NET/",$str2)){
echo "Match string 2!";
}
else {
echo "Does not match string 2!";
}
输出:
Does not match string 1!Match string 2!
'!'ü怎能错过!!!!!!!!!!!!!! – vks
那是什么输出? – iamnotmaynard
我应该在哪里添加它? – Justin