What I am trying to do is to extract email address out of the string SomeName, First (First.SomeName@usa.mywebsite1.com)
Here is the code that I already tried:
var stringToSearchIn="SomeName, First (First.SomeName@usa.mywebsite1.com)";
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\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);
The variable extractedEmail in the code returns a null.