ASP.NET电子邮件验证的正则表达式 [英] ASP.NET email validator regex

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

问题描述

有谁知道什么是ASP.NET中使用的电子邮件验证的正则表达式是什么? pretty请。

Does anyone know what the regex used by the email validator in ASP.NET is? Pretty please.

推荐答案

下面是在互联网电子邮件地址使用 RegularEx pressionValidator .NET中的正则表达式

Here is the regex for the Internet Email Address using the RegularExpressionValidator in .NET

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

顺便说一句,如果你把一个 RegularEx pressionValidator 在页面上,转到设计视图有一个 ValidationEx pression 字段,你可以使用来自.NET提供前pressions的列表中进行选择。一旦你选择你想要的前pression有一个验证前pression:文本保存用于验证正则表达式

By the way if you put a RegularExpressionValidator on the page and go to the design view there is a ValidationExpression field that you can use to choose from a list of expressions provided by .NET. Once you choose the expression you want there is a Validation expression: textbox that holds the regex used for the validator

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

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