Using regular expressions to verify whether Chinese strings are included.

time:11-06-30 forum:PHP tools and code
  Http://zhidao.baidu.com/question/110724700.html

[code]$str=.quot;.Lt; br.gt; beyond PHP:.quot;
if (preg_match (.Quot; /^.#91;.Quot); Quot; this is not a pure Chinese string.Quot;
}
[/code]
or
[code]/^ (.#91; \x00-\x7F.#93; |.#91; \x80-\xFE.#93;.#91;)

prev:The pancake rolls the onion, the hotel? next:Zhoushan man begged for 5 yuan to return...
post comment
Notice



approved   Phoenix reporter Dunfee and others l...   BigDog big foot transport robot in t...   Go to Ji'nan Lantau Peak set (standa...   Reminder: handle the delivery proced...   Extreme sports - dogs can do it
rand   Use.Htaccess to prevent images from ...   Encryption and decryption of PHP fil...   PHP hidden data, MD5 encryption, int...   Processing method of Chinese charact...   The solution of reading TXT Chinese ...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com