title: How to match only the domain part of a URL with regex?
body: <p>I'm writing a Python code that would process a block of text which, among the text useless for me, features URLs. Out of the text block I only need the domains, not the full URLs. Example input:</p>
  
  <pre><code>47.91.158.176 or 54.145.185.110 port 80 - gooolgeremf.top - GET /search.php
  47.90.205.113 or 35.187.59.173 port 80 - voperforseanx.top/site/chrome_update.html
  </code></pre>
  
  <p>So here I need only <code>gooolgeremf.top</code> and <code>voperforseanx.top</code> matched but the regex I've written will also match <code>search.php</code> and <code>chrome_update.html</code>. </p>
  
  <p>What I'm thinking is that the regex should stop matching after <code>/</code>. However I don't know how to implement it and especially how to not prevent matching domains that appear after the first <code>/</code> in the whole text file. </p>
  
  <p>The way it works so far in my code:</p>
  
  <pre><code>regexdm="[A-Za-z0-9]{1,}\.[A-Za-z0-9]{1,10}\.?[A-Za-z]{1,}\.?[A-Za-z]{1,}"
  dmsc=re.findall(regexdm, iocsd.read())
  </code></pre>