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