


PHP user registration information verification regular expression, user registration regular expression_PHP tutorial
Jul 12, 2016 am 09:05 AMphp用户注册信息验证正则表达式,用户注册正则表达式
下面这个正则验证用户名的方法原则是这样的用户名必须是由字母带数字带定划线组成了,下面一起来看看例子吧.
1.检查用户名是否符合规定“两位以上的字母,数字,或者下划线”,代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
两位以上的字母,数字,或者下划线:^[a-zA-Z0-9_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+$.
注:在这里,字母是a-z,A-Z,以及从127 到255(0x7f-0xff)的 ASCII 字符
2、密码:6—20位,由字母、数字组成,代码如下:
1 2 3 4 5 6 7 |
|
3、email验证,代码如下:
1 2 3 4 5 6 7 8 |
|
本文为大家分享了用户注册信息:用户名、密码以及邮箱验证的正则表达式,希望大家认真学习这篇《php用户注册信息验证正则表达式》,一定会有所收获。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How To Set Up Visual Studio Code (VS Code) for PHP Development
