public static boolean stringInPatterns ( String s , List < Pattern > patterns ) { for ( Pattern pattern : patterns ) { if ( pattern . matcher ( s ) . matches ( ) ) { return true ; } } return false ; }
Determines whether a string matches one of the regex patterns .