I am working to validate a string of email addresses. This pattern works fine if there is only one email address:
var pattern = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
But if I have two email addresses separated by space or by a newline, then it does not validate. For example:
[email protected] [email protected]
or
[email protected]
[email protected]
Can you please tell me what would be a way to do it? I am new to regular expressions.
Help much appreciated! Thanks.