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