Q: Extract Names from E-Mails in a textarea javascript 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:
john.doe@test.com, J.doe@mail.com, ...
and i need an output like this: john doe, J doe, ...
My current html code is as following:


<html>
<body>

Insert e-mail addresses:<br>

<textarea id="myTextarea"></textarea>
<textarea id="myTextarea2"></textarea>
<br><br>
<button type="button" onclick="myFunction()">Extract Names</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myTextarea").value;
    document.getElementById("demo").innerHTML = x;

}
</script>

</body>
</html>


Thanks!
