title: Use specific middleware in Express for all paths except a specific one
body: <p>I am using the Express framework in node.js with some middleware functions:</p>
  
  <pre><code>var app = express.createServer(options);
  app.use(User.checkUser);
  </code></pre>
  
  <p>I can use the <code>.use</code> function with an additional parameter to use this middleware only on specific paths:</p>
  
  <pre><code>app.use('/userdata', User.checkUser);
  </code></pre>
  
  <p>Is it possible to use the path variable so that the middleware is used for all paths except a specific one, i.e. the root path?</p>
  
  <p>I am thinking about something like this:</p>
  
  <pre><code>app.use('!/', User.checkUser);
  </code></pre>
  
  <p>So <code>User.checkUser</code> is always called except for the root path.</p>