title: Checking if url contains a number in express
body: <p>I am making a middleware function in nodejs and express js framework and I want to check if the url contains a number in it or not just like this </p>
  
  <p>/invoices/21 or /invoices/45</p>
  
  <p>so I am trying to do something like this </p>
  
  <pre><code> if (req.path.startsWith('/invoices/[^0-9]') {
      next();
    }  
  </code></pre>
  
  <p>but i am getting error I am still not able to do so can anyone give hint.</p>