What do you mean by max number of consecutive dots? Do you just mean number of consecutive dots (without the max part)?
If a line contains .... is that counted as one occurrence of consecutive dots or three occurrences ([..]..) , (.[..].), (..[..])?
Depending on what is you are actually looking for, you could use a regex expression for the matching, e.g
-
final Pattern p = Pattern.compile("(\\.{2,})");
-
final Matcher matcher = p.matcher("...asd.f.....ee.fgfgf");
-
while (matcher.find()) {
-
System.out.println("found: " + matcher.group(1));
-
}
-