logback-android/src/main/java/ch/qos/logback/core/util/StringCollectionUtil.java
public static void removeMatching(Collection<String> values,
      Collection<String> patterns) {
    List<String> matches = new ArrayList<String>(values.size());
    for (String p : patterns) {
      Pattern pattern = Pattern.compile(p);
      for (String value : values) {
        if (pattern.matcher(value).matches()) {
          matches.add(value);
        }
      }
    }
    values.removeAll(matches);
  }
public static void removeMatching(Collection<String> values,
      Collection<String> patterns) {
    List<String> matches = new ArrayList<String>(values.size());
    for (String p : patterns) {
      Pattern pattern = Pattern.compile(p);
      for (String value : values) {
        if (pattern.matcher(value).matches()) {
          matches.add(value);
        }
      }
    }
    values.removeAll(matches);
  }
public static void removeMatching ( Collection < String > values , Collection < String > patterns ) { List < String > matches = new ArrayList < String > ( values . size ( ) ) ; for ( String p : patterns ) { Pattern pattern = Pattern . compile ( p ) ; for ( String value : values ) { if ( pattern . matcher ( value ) . matches ( ) ) { matches . add ( value ) ; } } } values . removeAll ( matches ) ; }
Removes all values in the subject collection that are matched by
at least one of a collection of regular expressions.
<p>
The semantics of this method are conceptually similar to
{@link Collection#removeAll(Collection)}, but uses pattern matching
instead of exact matching.

@param values subject value collection
@param patterns patterns to match
Removes all values in the subject collection that are matched by at least one of a collection of regular expressions . <p > The semantics of this method are conceptually similar to { @link Collection#removeAll ( Collection ) } but uses pattern matching instead of exact matching .