由于中文的ASCII码是有一定的范围的。所以你可以用下面的正则表达式来表示中文。
/^[chr(0xa1)-chr(0xff)]+$/
下面是一个使用的例子:
- $str = "超越PHP";
- if (preg_match("/^[".chr(0xa1)."-".chr(0xff)."]+$/", $str)) {
- echo "这是一个纯中文字符串";
- } else {
- echo "这不是一个纯中文字串";
- }
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » 如何用正则表达式来表示中文?
波比源码 » 如何用正则表达式来表示中文?
levaquin brand levofloxacin 250mg brand
ampicillin pill cost ampicillin erythromycin 250mg pill
buy generic tadalis order tadacip 10mg pill buy voltaren 100mg generic
buy accutane generic purchase isotretinoin for sale generic zithromax
buy prednisone pills deltasone 20mg canada order sildenafil pills
isotretinoin brand buy azithromycin 500mg online cheap stromectol 12mg online
clonidine price order minocycline 50mg online cheap spiriva 9mcg tablet
order buspirone 10mg order phenytoin 100 mg pill oxybutynin 5mg us
tacrolimus 1mg oral buy ropinirole generic order ursodiol 150mg without prescription
cialis 10mg drug amantadine us amantadine tablet
buy generic provera 10mg order praziquantel 600mg pills buy cyproheptadine 4 mg without prescription
purchase tadalafil pills anafranil 25mg over the counter clomipramine 25mg us
metformin 1000mg ca tadalafil 10mg tablet buy cialis 20mg online cheap
purchase ozobax buy generic tizanidine buy toradol generic
cialis 20mg pills buy cipro 1000mg online cheap order cipro 500mg pills
buy tadalafil 10mg pills cialis 10mg tablet sildenafil 25 mg
purchase sildalis online order estradiol 1mg without prescription buy lamictal 200mg pill
buy prednisone online deltasone 40mg ca cost amoxil
order viagra 100mg buy viagra 50mg cialis 20mg generic
azithromycin 250mg without prescription azithromycin generic neurontin 100mg tablet
best online poker sites for real money buy stromectol 3mg pills provigil uk