0
preg_match日语假名代码,带单字节或双字节空格的字母数字。preg_match使用字母数字的日语假名代码?
if (!preg_match("[ァ-ヶー ][a-zA-Z0-9 ]+$", $name)) {
return 'display err msg。';
}
,但它不工作。
而不是上面的代码下面的代码正在工作,但要包括单字节和双字节空格。
if (!preg_match('/^(?:\xE3\x82[\xA1-\xBF]|\xE3\x83[\x80-\xB6]|\xE3\x83\xBC)+$/', $this -> data[$this->name]['kana'])) {
return 'display err msg';}
有没有机会呢?...帮助我..
我问题是编辑... – VJS
而不是上面的代码下面的代码工作,但要包括单字节和双字节的白色空间。如果(!preg_match('/ ^(?:\ xE3 \ x82 [\ xA1- \ xBF] | \ xE3 \ x83 [\ x80- \ xB6] | \ xE3 \ x83 \ xBC)+ $ /',$ this - > data [$ this-> name] ['kana'])){ return'display err msg';} – VJS