docs: public static Pattern createPattern(final String pattern, final int flags) {
          if (pattern == null) {
              LOGGER.debug("Pattern cannot be null");
              return MATCH_NOTHING_PATTERN;
          }
          try {
              return Pattern.compile(pattern, flags);
          } catch (final PatternSyntaxException exception) {
              LOGGER.debug("Pattern [{}] is not a valid regex.", pattern);
              return MATCH_NOTHING_PATTERN;
          }
      }