使用正则表达式验证电子邮 [英] Email validation using regular expression

查看:62
本文介绍了使用正则表达式验证电子邮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,





任何人都可以使用正则表达式给我一个有效的电子邮件ID验证器,这是最理想的工作考虑到不同类型的特殊字符及其组合几乎所有不同的情况。



提前谢谢

解决方案

你的要求很多。怎么样才开始呢

 \ w +([ -  +。'] \ w +)* @ \ w +([ - 。] \ w +) * \.\w +([ - 。] \ w +)* 



并在此研究 http://www.regexlib.com/?AspxAutoDetectCookieSupport=1 [ ^ ]


试试这个



如何查找或验证电子邮件地址 [ ^ ]



BTW我推荐以下免费软件正常表达的东西

Expresso 3.0 - 首要的正则表达式开发工具 [ ^ ]


嗨>


尝试这个..



正则表达式objEmail =  new 正则表达式(  \\\\ + +([ -  +。' ] \\w +)* @ \\w +([ - ] \\w +)* \\.\\w +([ - ] \\w +)*); 







谢谢......


Hello All,


Can any one give me a valid Email Id validator using regular expression which is the most ideal and works for almost all the different cases considering the different types of special characters and their combinations.

Thanks in advance

解决方案

Your asking for quite a lot. How about just start with this

\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*


and research here http://www.regexlib.com/?AspxAutoDetectCookieSupport=1[^]


Try this

How to Find or Validate an Email Address[^]

BTW I recommend the following freeware to regular expression things
Expresso 3.0 - The premier regular expression development tool[^]


Hi
Try this one..

Regex objEmail = new Regex("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");




Thanks...


这篇关于使用正则表达式验证电子邮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆