title: Regex for route matching in Express
body: <p>I'm not very good with regular expressions, so I want to make sure I'm doing this correctly. Let's say I have two very similar routes, <code>/discussion/:slug/</code> and <code>/page/:slug/</code>. I want to create a route that matches both these pages.</p>
  
  <pre><code>app.get('/[discussion|page]/:slug', function(req, res, next) {
    ...enter code here...
  })
  </code></pre>
  
  <p>Is this the correct way to do it? Right now I'm just creating two separate routes.</p>
  
  <pre><code>someFunction = function(req, res, next) {..}
  app.get('/discussion/:slug', someFunction)
  app.get('/page/:slug', someFunction)
  </code></pre>