title: Node express vanity url path parameter with exclusions
body: <p>I originally had this route for matching any <code>clientId</code> after <code>/c</code> which worked great because I didn't have to worry about static files, ajax endpoints, or any other pages.</p>
  
  <p><code>app.get('/c/:clientId'</code></p>
  
  <p>The request came in to get rid of the <code>/c</code> for vanity purposes so I tried my best to do negated lookaheads for static files, etc <code>(?!css\/|js\/|...</code> at the same time doing a capture group <code>(.*)</code> to get the actual value for <code>req.params[0]</code>.</p>
  
  <p>Unfortunately, I wasn't able to capture the value "up to" the first forward and ended up using <code>(\w*)</code> as the capture workaround. However, this only grabs <code>/client123</code></p>
  
  <p><code>/client123/item/e0980780-efac-11e3-ac10-0800200c9a66</code></p>
  
  <p>but not <code>/some-super-duper-client5000</code></p>
  
  <p><code>/some-super-duper-client5000/item/e0980780-efac-11e3-ac10-0800200c9a66</code></p>
  
  <p>Please see example here:</p>
  
  <p><a href="http://regexr.com/38vk6" rel="nofollow">http://regexr.com/38vk6</a></p>
  
  <p>Any insight would be appreciated!</p>