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 space eg "test@test.com Test@tes.com"
.But That is not correct.so can anyone tell me how to achieve this?Also when there is a single email id no need of semi-colon in between