```
String secondLine = ...E......E..E.E;    
String failures = "E";    
String passed = ".";

int i = 0;
while ((i = (secondLine.indexOf(failures, i) + 1)) > 0) {
    System.out.println(i);
    feedbackString += "<strong style='color: red;'><li>Failed: </strong><strong>" + i + "</strong> - " + "out of " + resultString.length() + " tests.<br>";
}

```

The total number of the tests is the sum of the dots which is = 12. and the E's are the failures which in this case = 4.

The dots are the passes and the E's are the failures. Whenever this is ran and there is a failure, it adds an 'E' in front of the dot which becomes'.E'. I can get the E's on its own but I want a statement that says given a dot comes before the E and then it should print the '.E' and pass it into a variable called failedTest.

The code above has an output of: 4, 11, 14, 16 which is not what I want as its considering each character separately but I want it to consider '.E' as one that is if an E comes after a dot then it should consider it as one. if this should be ran considering the '.E' as failure, the expected output should be 3, 9, 11, 12. Thanks :)