title: In react router 4, how does one negate a route / path using regex?
body: <p>Say i have a route switch statement like the following:</p>
  
  <pre><code>render () {
      &lt;pre&gt;
          &lt;Switch&gt;
              &lt;Route path="/foo" render={render}&gt;
              &lt;Route path="/bar" render={renderBar}&gt;
              &lt;Route path="/" render={renderHome}&gt;
  
              {/* How do i express everything except the home page ?*/}
  
              &lt;Route render={renderFourOhFour}&gt;
          &lt;/Switch&gt;
      &lt;/pre&gt;
  }
  </code></pre>
  
  <p>How do i write a route that excludes everything except the home page given the above example? Do i just write a regex? If so i've tried something like</p>
  
  <p><code>path={^(?!.*(home))}</code></p>
  
  <p>with the regex react router v4 tester: <a href="https://pshrmn.github.io/route-tester/#/" rel="noreferrer">https://pshrmn.github.io/route-tester/#/</a></p>