code: public PathMatcher excludeRegex(final String regex) {
          CommonHelper.assertNotBlank("regex", regex);
          logger.warn("Excluding paths with regexes is an advanced feature: be careful when defining your regular expression " +
                  "to avoid any security issues!");
  
          if (!regex.startsWith("^") || !regex.endsWith("$")) {
              throw new TechnicalException("Your regular expression: '" + regex + "' must start with a ^ and end with a $ " +
                  "to define a full path matching");
          }
  
          excludedPatterns.add(Pattern.compile(regex));
          return this;
      }
docs: Any path matching this regex will be excluded.
  
  @param regex the regular expression matching the paths to be excluded
  @return this path matcher