This is a modified version of raina77ow's code. It wasmissing some checks (read the comment I wrote)
$datePattern = '\d{4}-\d{2}-\d{2}';
$timePattern = '\d{2}:\d{2}:\d{2}';
$headerPattern = $datePattern . ' ' . $timePattern . ' \[INFO] ';
$showingPattern = $headerPattern
. 'Showing \d+ objective\(s\) on scoreboard';
$messagePattern = $headerPattern
. "- [^:]+: displays as '[^']*' and is type '[^']*'";
$noPattern = $headerPattern
. "There are no objectives on the scoreboard";
$results = array();
$i = $max = count($arr);
while ($i--) {
$msg = $arr[$i];
if (preg_match("/^$showingPattern/", $msg)) {
$result = array($msg);
for ($j = $i + 1; $j < $max; $j++) {
$nextMsg = $arr[$j];
if (preg_match("/^$messagePattern/", $nextMsg)) {
$result[] = $nextMsg;
}
else {
break;
}
}
$results[$i] = $result;
}
}
$no=preg_grep("/^$noPattern/",array_reverse($arr));
$results=array_shift($results);
$count=count($results);
$notime=strtotime("the 1st of september 1971");
$notime=strtotime(substr(array_shift($no),0,19));
$resulttime=strtotime(substr($results[0],0,19));
if ($resulttime>$notime) {
for($i=0;$i<$count;$i++){
echo substr($results[$i],27).'<br/>';
}
}
else echo 'There are no objectives on the scoreboard';