title: how to remove .com, .org,.co.uk,.co.us using regular expression in javascript?
body: <p>I am working on regular expression and right now I am having problem as I am not able to remove the .com, .net, .co.uk kind of extensions from the url that is for example I have a url like</p>
  
  <pre><code>url = subdomain.domain.com or domain.co.uk or domain.net
  </code></pre>
  
  <p>after using regular expression I need the output to be only <strong>domain</strong>..so can someone help me out with this.</p>