code: public void addPattern(final String pattern, final int flags) {
          patterns.put(pattern, Pattern.compile(pattern, flags));
      }
docs: Adds the specified regular expression to be matched against the data to be validated, with the specified pattern
  flags.<br>Note that if you need the matching to be done strictly on the whole input data, you should surround the
  patterns with the '^' and '$' characters.
  
  @param pattern Regular expression to be added.
  @param flags   Regular expression pattern flags.<br>Refer to {@link Pattern#compile(String, int)}.
  
  @see #addPattern(String)
  @see Matcher#find()