title: How to extract Domain from DNS data in hive
body: <p>How to extract the domain name from the DNS data.</p>
  
  <p>The example I want to extract domain from:</p>
  
  <pre><code>www.google.com
  </code></pre>
  
  <p>The result should be <code>google</code>.</p>
  
  <p>I am using hive to fetch the data from Hadoop and using regular extract function.</p>