ASP.NET 电子邮件验证器正则表达式 [英] ASP.NET email validator regex
问题描述
有谁知道 ASP.NET 中电子邮件验证器使用的正则表达式是什么?
Does anyone know what the regex used by the email validator in ASP.NET is?
推荐答案
这是在 .NET 中使用 RegularExpressionValidator 的 Internet 电子邮件地址 的正则表达式
Here is the regex for the Internet Email Address using the RegularExpressionValidator in .NET
w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*
顺便说一下,如果您在页面上放置一个 RegularExpressionValidator 并转到设计视图,则会有一个 ValidationExpression 字段,您可以使用它从表达式列表中进行选择.NET 提供.一旦你选择了你想要的表达式,就会有一个 Validation expression: 文本框,其中包含用于验证器的正则表达式
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屋!