Break out of for loop once a match is identified