code: function matchURL(re, req) {
      var i = 0;
      var result = re.exec(req.path());
      var params = {};
  
      if (!result) {
          return (false);
      }
  
      // This means the user original specified a regexp match, not a url
      // string like /:foo/:bar
      if (!re.restifyParams) {
          for (i = 1; i < result.length; i++) {
              params[(i - 1)] = result[i];
          }
  
          return (params);
      }
  
      // This was a static string, like /foo
      if (re.restifyParams.length === 0) {
          return (params);
      }
  
      // This was the "normal" case, of /foo/:id
      re.restifyParams.forEach(function (p) {
          if (++i < result.length) {
              params[p] = result[i];
          }
      });
  
      return (params);
  }
docs: given a request, try to match it against the regular expression to
  get the route params.
  i.e., /foo/:param1/:param2
  @private
  @function matchURL
  @param    {String | RegExp} re   a string or regular expression
  @param    {Object}          req  the request object
  @returns  {Object}