code: @Beta
      public static void checkMatches(String reference, Pattern pattern,
                                      @Nullable String errorMessageTemplate,
                                      @Nullable Object... errorMessageArgs) {
          checkArgument(reference != null, "Expected non-null reference");
          checkArgument(pattern != null, "Expected non-null pattern");
          checkArgument(pattern.matcher(reference).matches(), errorMessageTemplate, errorMessageArgs);
      }
docs: Performs check with the regular expression pattern.
  
  @param reference            reference to check
  @param pattern              the regular expression pattern
  @param errorMessageTemplate a template for the exception message should the
  check fail. The message is formed by replacing each {@code %s}
  placeholder in the template with an argument. These are matched by
  position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc.
  Unmatched arguments will be appended to the formatted message in square
  braces. Unmatched placeholders will be left as-is.
  @param errorMessageArgs     the arguments to be substituted into the message
  template. Arguments are converted to strings using {@link String#valueOf(Object)}.
  @throws IllegalArgumentException if the {@code reference} doesn't match provided regular expression
  @throws NullPointerException     if the {@code reference} is null; also when the check fails and either
  {@code errorMessageTemplate} or {@code errorMessageArgs} is null (don't let this happen)
  @see java.util.regex.Pattern