Hi guys i have a requirement such that i have to validate email addresses seperated by semicolon.For example "[email protected]; [email protected]" 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 "[email protected] [email protected]"
.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