preg_match("/\u7ea6\u5417/",'你好约吗?',$why); 直接这样写什么都不能匹配啊
<?php $subject = "baby,晚上约吗?"; $why = NULL; if (preg_match("/[\u{7ea6}\u{5417}]+/",$subject,$why)) { print_r($why); } else { echo "匹配失败"; } ?>
需要加上{}