Break out of loop after match is found