title: Express serving static files for multiple paths using regex
body: <p>I've different paths in my app like:  </p>
  
  <ul>
  <li><code>/a</code></li>
  <li><code>/a/:b</code></li>
  <li><code>/a/:/b/:c/:d</code></li>
  </ul>
  
  <p>For paths like <code>/a</code>, I use:</p>
  
  <pre><code>app.use(express.static(path.join(__dirname, 'public')));
  </code></pre>
  
  <p>For paths like <code>/a/:b</code>, I add another like this:</p>
  
  <pre><code>app.use('/a', express.static(path.join(__dirname, 'public')));
  </code></pre>
  
  <p>Instead of adding <code>express.static</code> for every path, is there any way to achieve this using a single line of code possibly by using regex.
  Something like:</p>
  
  <pre><code>app.use(/\/[a-z]*/, express.static(path.join(__dirname, 'public')));
  // BTW, this doesn't work
  </code></pre>
  
  <p>What would be a good practice to serve static files for multiple paths? Thank you.</p>