php正则表达式,容许有数字,字母,和标点

WBOY
Release: 2016-06-13 12:10:34
Original
932 people have browsed it

php正则表达式,允许有数字,字母,和标点
php正则表达式,允许有数字,字母,和标点
,下面的是允许数字和字母。但是标点不知道怎么写
if(preg_match(" /^[0-9a-zA-Z_]{6,16}$/",$password)){  
 //通过
}else{
 //不能通过
}
------解决思路----------------------
/^[0-9a-zA-Z_,]{6,16}$/
------解决思路----------------------

if(preg_match(" /^\S{6,16}$/",$password)){  <br /> //通过<br />}else{<br /> //不能通过<br />}
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