for _, group in StrSplit(FileOpen("data6.txt","R").Read(),"`r`n`r`n") Loop 26 { p1 += !!RegExMatch(group,chr(96 + A_Index)) p2 += !!RegExMatch(group,"s)(" chr(96 + A_Index) ".*){" StrSplit(group,"`n").Length() "}") } Msgbox % "Part 1: " p1 "`nPart 2: " p2