title: Get domain name from the email list
body: <p>Get domain name from the email list<br>
  Hi, I have a list of email id from which i have to get the domain name.  </p>
  
  <p>For simple email like <code>sample@example.com</code>, I have done the code part from which I got the domain.<br>
  But for emails like <code>hello@in.ibm.com</code> (actual domain name is <code>ibm.com</code>), I am unable to get the domain.</p>
  
  <pre><code>String domainName = "";
  String[] parts = email.split("@");
  if(parts.length == 2) 
      domainName = parts[1];
  </code></pre>
  
  <p>How do I split or do a regular expression to get the domain name?</p>