docs: private static void validateRegex(String regex) {
  		if (regex == null) {
  			throw new IllegalArgumentException("The regular expression must not be null.");
  		}
  		String trimmedRegex = regex.trim();
  		if (!trimmedRegex.isEmpty()) {
  			Pattern.compile(trimmedRegex, Pattern.CASE_INSENSITIVE);
  		}
  	}