docs: function buildRegex(pattern) {
      var re = pattern
        .replace(escapeRegex, '\\$&')
        .replace(namedParam, '([^/]*)')
        .replace(splatParam, '(.*?)');
  
      return new RegExp('^' + re + '$');
    }