Home > Backend Development > PHP Tutorial > php正则表达式数字+中文识别问题

php正则表达式数字+中文识别问题

WBOY
Release: 2016-06-02 11:34:00
Original
1108 people have browsed it

识别数字php正则表达式

写了一个匹配8位数字的正则表达式,"/\b\d{8}\b/",但匹配的时候发现输入数字+中文能通过,例如:11111111张三.输入数字+任意字符都不能通过.请问这是怎么回事?怎么解决呢

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template