I have a requirement where I send multiple emails to client.
But I have a issue while sending email to multiple email Ids.
For example, if I write
[email protected];[email protected]
It would throw me an error stating email id is not correct.
I want the email ids to be separated by semicolon but it seems my regex is not supporting semicolons.
Proper format should be :
[email protected];[email protected]
Should not allow
s;[email protected]
Regex used
myregex = "^['_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"
Please guide.