title: JAVASCRIPT/Chrome: How to Get Extension of Page
body: <p>Given </p>
  
  <pre><code>google.com
  </code></pre>
  
  <p>How can I get <strong>.com</strong> and save it to a variable. I was thinking of using regex to split google.com into google and ".com", but I don't know the regex to do this.</p>
  
  <p>It might help to know that I got the hostname from using <em>window.location.hostname</em></p>
  
  <p>Thank you!</p>