Correct determination of end positions, listing found strings.