lundi 8 octobre 2018

Multiple email seperated by semicolon regex

Hi guys i have a requirement such that i have to validate email addresses seperated by semicolon.For example "test@test.com; test@Tes.com" something like this.I am using the below regex :

(([^@]+@[^\s@]+\.[^\s@;]{2,}\;{0,1}\s*))+

The problem here it the regex works even if there is no semicolon in between but with a space eg "test@test.com Test@tes.com".But That is not correct.so can anyone tell me how to acheive this




Aucun commentaire:

Enregistrer un commentaire