title: Use javascript to find email address in a string
body: <p>What I am trying to do is to extract email address out of the string <code>SomeName, First (First.SomeName@usa.mywebsite1.com)</code></p>
  
  <p>Here is the code that I already tried:</p>
  
  <pre><code> var stringToSearchIn="SomeName, First (First.SomeName@usa.mywebsite1.com)";
  
  
   var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
  
  var extractedEmail=re.exec(stringToSearchIn);
  </code></pre>
  
  <p>The variable extractedEmail in the code returns a null.</p>