code: public static Multimap<String, PathOperation> groupOperationsByRegex(List<PathOperation> allOperations, Pattern headerPattern) {
  
          Multimap<String, PathOperation> operationsGroupedByRegex = LinkedHashMultimap.create();
  
  
          for (PathOperation operation : allOperations) {
              String path = operation.getPath();
              Matcher m = headerPattern.matcher(path);
  
              if (m.matches() && m.group(1) != null) {
                  if (logger.isDebugEnabled()) {
                      logger.debug("Added path operation '{}' to header '{}'", operation, m.group(1));
                  }
                  operationsGroupedByRegex.put(m.group(1), operation);
              } else {
                  if(logger.isWarnEnabled()) {
                      logger.warn("Operation '{}' does not match regex '{}' and will not be included in output", operation, headerPattern.toString());
                  }
              }
          }
  
          return operationsGroupedByRegex;
      }
docs: Groups the operations by regex group. The key of the Multimap is the group name.
  The value of the Multimap is a PathOperation
  
  @param allOperations all operations
  @param headerPattern regex pattern used for determining headers
  @return Operations grouped by regex