docs: function extractPathParams(pattern, path) {
      const regex = new RegExp(pattern);
      const matches = regex.exec(path);
      if (!matches) {
          return [];
      }
      else {
          const groups = [...matches];
          // remove first result since its not a capture group
          groups.shift();
          return groups;
      }
  }