DE
Size: a a a
С
DE
J
J
J
J
J
З🧟
З🧟
import java.util.regex.Matcher;
import java.util.regex.Pattern;
final String regex = "[\\*]";
final String string = "****";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(string);
long matches = matcher.results().count();
if(matches == 4){
...
}
З🧟
DE
З🧟
DE
З🧟
DE
DE
Р
З🧟
Р