title: extract first and last name from pattern email address
body: <p>I am trying to get the First Name and Last Name out of a series of email addresses. There is a pattern for each e-mail address. The pattern is first.last@company.com but in some cases, it can be something like first.middle.last@company.com. The main point being that there can be something in between the first and last name in the e-mail but not always. 
  The main pattern, which is always the same, is that the first string, until the first dot is always the first name, and the last name is always the last character series until the @ char which begins from the previous DOT.
  Examples:</p>
  
  <p>charles.bukowski@company.com
  first: charles
  last:bukowski</p>
  
  <p>charles.mark.bukowski@copmany.com
  first: charles
  last:bukowski</p>
  
  <p>charles.x.markus.bukowski@company.com
  first: charles
  last:bukowski</p>
  
  <p>Getting the first name is easy. I have the following variables:</p>
  
  <pre><code>var empmail = 'charles.x.markus.bukowski@company.com'
  var empname = empmail.substring(0, empmail.indexOf("."));
  </code></pre>
  
  <p>I cannot find the way to get out the last name.</p>