docs: public static boolean validateRegex(String value, String regex, boolean allowEmpty) {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
              return allowEmpty;
          }
          Pattern pattern = Pattern.compile(regex);
          Matcher matcher = pattern.matcher(value);
          return matcher.matches();
      }