Home  >  Article  >  Backend Development  >  如何去验证用户名和密码是由数字和字母构成的

如何去验证用户名和密码是由数字和字母构成的

WBOY
WBOYOriginal
2016-06-13 13:28:52792browse

怎么去验证用户名和密码是由数字和字母构成的?
怎么去验证用户名和密码是由数字和字母构成的? 如果需要正则麻烦帮忙写下吧

------解决方案--------------------
/^[a-z0-9]+$/i
i忽略大小写,如果需要的下还要忽略换行

Statement:
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