How to match a comma separated list of emails with regex?

前端 未结 13 1332
一整个雨季
一整个雨季 2020-12-15 07:29

Trying to validate a comma-separated email list in the textbox with asp:RegularExpressionValidator, see below:



        
13条回答
  •  不思量自难忘°
    2020-12-15 08:06

    The regex below is less restrictive and more appropriate for validating a manually-entered list of comma-separated email addresses. It allows for adjacent commas.

    ^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},*[\W]*)+$
    

提交回复
热议问题