简单的正则问题

WBOY
Release: 2016-06-23 14:21:21
Original
910 people have browsed it

匹配5个以上的3是 /3{5,}/,可是匹配5个以上的数字0,/0{5,}/,这样就不行了,求助,谢谢了!!!


回复讨论(解决方案)

怎么呢?

echo preg_match('/0{5,}/', '000'); //0 echo preg_match('/0{5,}/', '000000'); //1
Copy after login

Related labels:
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