code: public static Pattern repeat(Pattern pattern, int min, int max)
     {
        if (pattern == null)
        {
           throw new IllegalArgumentException("Pattern can not be null");
        }
        return new RepeatPattern(pattern, min, max);
     }
docs: A pattern which matches <code>pattern</code> as many times as possible
  but at least <code>min</code> times and at most <code>max</code> times.
  @param pattern
  @param min
  @param max
  @return