title: Regular expression to extract domain name from any domain
body: <p>I'm trying to extract the domain name from a string in C#. You don't necessarily have to use a RegEx but we should be able to extract <code>yourdomain.com</code> from all of the following:</p>
  
  <pre><code>yourdomain.com
  www.yourdomain.com
  http://www.yourdomain.com
  http://www.yourdomain.com/
  store.yourdomain.com
  http://store.yourdomain.com
  whatever.youdomain.com
  *.yourdomain.com
  </code></pre>
  
  <p>Also, any TLD is acceptable, so replace all the above with <code>.net</code>, <code>.org</code>, <code>'co'uk</code>, etc.</p>