title: Regex search for ONLY domains, ignoring domain component of URL
body: <p>Given a block of arbitrary text, I need a regex pattern that will find/extract domains only, ignoring scheme and subdomain components of domains, and ignoring strings entirely if there is a path (these are being extracted as URLs)</p>
  <p>Example Text:</p>
  <p><code>www.google.com/example</code><br />
  <code>www.stackoverflow.com</code><br />
  <code>https://reddit.com</code><br />
  <code>https://www.facebook.com/username</code></p>
  <p>Matches:<br />
  <code>reddit.com</code><br />
  <code>stackoverflow.com</code></p>
  <p>I have tried the following</p>
  <p><code>\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b</code></p>
  <p>Which of course will return:<br />
  <code>www.google.com</code><br />
  <code>www.stackoverflow.com</code><br />
  <code>reddit.com</code><br />
  <code>www.facebook.com</code></p>