regexRouteWrapper = function(params) {

    return function(req, res, next) {
      // Apply the regex route params
      params.forEach(function(param, index) {
        req.params[param] = req.params[index];
      });
      // Call enhancedFn (which is just defined above)
      enhancedFn(req, res, next);
    };
  }
Wrap a regex route in a helper function that pulls out regex params

Example: for route: 'r|/\\d+/(.*)/(.*)$|foo,bar', the two parenthesized
groups would be pulled out as req.params[0] and req.params[1] by Express;
the regexRouteWrapper would then map them to req.params['foo'] and req.params['bar']

@param  {array} params List of params to apply to the req.params object
@return {Function} A middleware function