code: public static Pattern repeat(int n, CharPredicate predicate) {
      Checks.checkNonNegative(n, "n < 0");
      return new RepeatCharPredicatePattern(n, predicate);
    }
docs: Returns a {@link Pattern} object that matches if the input has at least {@code n} characters and the first {@code
  n} characters all satisfy {@code predicate}.