查看: 847|回复: 8
|
[PHP][Regex]Email 验证
[复制链接]
|
|

楼主 |
发表于 4-5-2007 05:33 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 4-5-2007 06:39 PM
|
显示全部楼层
你是要verify email还是只是将email分开? |
|
|
|
|
|
|
|

楼主 |
发表于 5-5-2007 01:22 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 5-5-2007 03:29 PM
|
显示全部楼层
原帖由 V4ndrake 于 5-5-2007 01:22 AM 发表
只是需要verify,暂时不需要store
建议先分开。再verify。 |
|
|
|
|
|
|
|
发表于 6-5-2007 07:57 AM
|
显示全部楼层
Email验证那一端是对的,不过,你要verify整串Email就有点。。。。
像楼上说的,分开来是一个比较好的做法。 |
|
|
|
|
|
|
|

楼主 |
发表于 6-5-2007 05:07 PM
|
显示全部楼层
怎样分开?用explode分开?
但是explode分开的话,有些人如果两个email中间除了comma还有空格的话要怎么办?
p/s: 我在讲什么啊……把空格去掉然后用explode分开不就得了……真是白痴……
[ 本帖最后由 V4ndrake 于 6-5-2007 05:09 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 8-5-2007 11:19 AM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 9-5-2007 09:47 AM
|
显示全部楼层
可是……如果\w的话,我what@the.hell也可以过不是咩?
而且\w……
“word” character is any letter or digit or the underscore character
The definition of letters and digits is controlled by PCRE’s character tables, and may vary if locale-specific matching is taking place. For example, in the “fr” (French) locale, some character codes greater than 128 are used for accented letters, and these are matched by \w.
出处:http://www.sitepoint.com/blogs/2 ... word_metacharacters
p/s: 当然我的意思不是我的solution是最好的,因为我发觉what@thehell.comz可以过
[ 本帖最后由 V4ndrake 于 9-5-2007 09:49 AM 编辑 ] |
|
|
|
|
|
|
| |
本周最热论坛帖子
|