So here's my solution:
def state?(zip) zip_code_list = File.open('zips.txt') suggested_list = zip_code_list.grep(/(.*"#{zip}\d+".*)/) end