title: Remove subdomain from string in ruby
body: <p>I'm looping over a series of URLs and want to clean them up. I have the following code:</p>
  
  <pre><code># Parse url to remove http, path and check format
  o_url = URI.parse(node.attributes['href'])
  
  # Remove www
  new_url = o_url.host.gsub('www.', '').strip
  </code></pre>
  
  <p>How can I extend this to remove the subdomains that exist in some URLs?</p>