title: regex to allow "www" (optional) but exclude subdomains on Google Analytics
body: <p>I am attempting to exclude all subdomains but still allow www. (optional)
  And then anything after the domain name is optionally allowed</p>
  
  <p>Here is what I'm looking for:</p>
  
  <pre><code>www.domain.com       // true
  domain.com           // true
  sub.domain.com       // false
  domain.com/hello     // true
  www.domain.com/hello // true
  </code></pre>
  
  <p>Here is what I have:</p>
  
  <pre><code>^(?i)(?:www\.)?domain.com.*
  </code></pre>
  
  <p>This is still allowing other subdomains.</p>
  
  <p>I have tried</p>
  
  <pre><code>^(?i)(?:www\.)(?![-\w.])?domain.com.*
  </code></pre>