title: Extract domain name from URL using python's re regex
body: <p>I want to input a URL and extract the domain name which is the string that comes after http:// or https:// and contains strings, numbers, dots, underscores, or dashes. </p>
  
  <p>I wrote the regex and used the python's <code>re</code> module as follows:</p>
  
  <pre><code>import re
  m = re.search('https?://([A-Za-z_0-9.-]+).*', 'https://google.co.uk?link=something')
  m.group(1)
  print(m)
  </code></pre>
  
  <p>My understanding is that <code>m.group(1)</code> will extract the part between () in the re.search. </p>
  
  <p>The output that I expect is: <code>google.co.uk</code>
  But I am getting this:</p>
  
  <pre><code>&lt;_sre.SRE_Match object; span=(0, 35), match='https://google.co.uk?link=something'&gt;
  </code></pre>
  
  <p>Can you point to me how to use <code>re</code> to achieve my requirement?</p>