开发者

Regular expression for multiple emails in ASP.Net

In my application I validate emails; but we can give more than one email address separated with a semicolon (";"). How can I write the validation expression?

My emails look like this:

"sasidhar@yahoo.com;suryasasidhar@开发者_高级运维gmail.com;srinivas@gmail.com "

How can I write a regular expression for this?


Start with the basic email regex and then apply as follows:

<email regex>(;<email regex>)*


You can give this a try:

\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*

This is from RegexLib.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜