title: Javascript regex to match exact folder path
body: <p>I have a folder structure like this:</p>
  
  <pre><code>main
  |__Test
     |__Sub
        |__Match
        |__Match1
        |__Match2
  </code></pre>
  
  <p>I have a requirement to:</p>
  
  <ol>
  <li>Match only one folder - "Match"</li>
  <li>Match multiple folder - "Match, Match1, Match2</li>
  </ol>
  
  <p>For a) I've tried:</p>
  
  <pre><code>/main\/Test\/Sub\/Match\//
  </code></pre>
  
  <p>But that didn't help.</p>
  
  <p>Basically, I am using <a href="https://www.npmjs.com/package/isparta-instrumenter-loader" rel="nofollow noreferrer">Isparta</a>, and I need to exclude a few folders from instrumentation.</p>