if (array.stream().filter(s -> s.contains(string)).count() > 0)
Pattern patternUppercase = Pattern.compile("[A-Z]");
Pattern patternLowercase = Pattern.compile("[a-z]");
int countCapitals = 0;
int countLowcaseCharacters = 0;
Matcher m = patternUppercase.matcher(string);
while (m.find()) {
countCapitals++;
}
m = patternLowercase.matcher(string);
while (m.find()) {
countLowcaseCharacters++;
}