title: Get just the domain name from a URL?
body: <p>I am trying to extract just the domain name from a URL string. I almost have it... I am using URI</p>
  
  <p>I have a string.. my first thought was to use Regex but then i decided to use URI class</p>
  
  <p><a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAgQFjAA&amp;url=http://www.test.com/&amp;rct=j&amp;q=test&amp;ei=G2phS-HdJJWTjAfckvHJDA&amp;usg=AFQjCNFSEAztaqtkaIvEzxmRm2uOARn1kQ" rel="noreferrer">http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAgQFjAA&amp;url=http://www.test.com/&amp;rct=j&amp;q=test&amp;ei=G2phS-HdJJWTjAfckvHJDA&amp;usg=AFQjCNFSEAztaqtkaIvEzxmRm2uOARn1kQ</a></p>
  
  <p>I need to convert the above to google.com  and google without the www</p>
  
  <p>I did the following</p>
  
  <pre><code>Uri test = new Uri(referrer);
  log.Info("Domain part : " + test.Host);
  </code></pre>
  
  <p>Basically this returns www.google.com .... i would like to try and return 2 forms if possible...  as mentioned...</p>
  
  <p>google.com
  and google</p>
  
  <p>Is this possible with URI?</p>