Sign-up....

求助!怎样判断邮箱格式正确!

怎样判断邮箱格式正确,最好写出例子

[19 byte] By [msdn] at [2007-8-14 9:08:42]
# 1 Re: 求助!怎样判断邮箱格式正确!

就是判断邮箱地址字符串里是不是包含了@字符和.字符。你找找相关的函数看看吧。

zhshtan at 2005-2-23 15:36:53 >
# 2 Re: 求助!怎样判断邮箱格式正确!

usermail=HTMLEncode(Request.Form("usermail"))

if instr(usermail,"@ ")=0 then message=message&"<li>您的电子邮件地址填写错误"

faBIao at 2005-2-23 15:46:44 >
# 3 Re: 求助!怎样判断邮箱格式正确!

用正则,匹配下面这个,合法的邮箱地址

"^[\\w-]+(\\.[\\w-]+)*@ [\\w-]+(\\.[\\w-]+)+$"

lawyu at 2005-2-23 16:01:23 >
# 4 Re: 求助!怎样判断邮箱格式正确!
此邮箱格式是否正确
at 2007-1-19 23:10:11 >
# 5 Re: 求助!怎样判断邮箱格式正确!
呵呵...

你一后小点心吧

anonymous at 2007-5-25 21:21:32 >

Web

All Classified