title: Given a URL, how can I get just the domain?
body: <p>Given URLs like:</p>
  
  <pre><code>http://online.wsj.com/
  http://online.wsj.com/article/SB10001424052970204409004577158764211274708.html
  http://www.techcrunch.com/2012/01/13/techcrunch-coo/
  </code></pre>
  
  <p>Using Ruby/Rails, how can I return back just the domain?</p>
  
  <pre><code>online.wsj.com
  online.wsj.com
  techcrunch.com
  </code></pre>
  
  <p>No protocol, no slashes, just the subdomain if it's not <code>www</code>, and the domain, and ext?</p>