title: Extract Names from E-Mails in a textarea javascript
body: <p>I've got a simple textarea in an html form. That textarea can be filled with multiple e-mail addresses. I need a way to extract the Names from the e-mail addresses from the first textarea into the other textarea, for example:</p>
  
  <p><code>john.doe@test.com, J.doe@mail.com, ...</code></p>
  
  <p>and i need an output like this: <code>john doe, J doe, ...</code></p>
  
  <p>My current html code is as following:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;body&gt;
  
  Insert e-mail addresses:&lt;br&gt;
  
  &lt;textarea id="myTextarea"&gt;&lt;/textarea&gt;
  &lt;textarea id="myTextarea2"&gt;&lt;/textarea&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;button type="button" onclick="myFunction()"&gt;Extract Names&lt;/button&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  function myFunction() {
      var x = document.getElementById("myTextarea").value;
      document.getElementById("demo").innerHTML = x;
  
  }
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks!</p>