Thanks to everyone for their help! Here is the final code that gave me the best result: ----- import os, re file = open("200214092341eriswor_1_56.txt", "r") s = file.read() r = re.compile('"TREES"\s*(.*?)s*"END TREES"', re.DOTALL) trees = r.findall(s) for tree in trees: print tree ----- Kind regards, Michael Lachance Plant Protection Technician ALB Eradication Program USDA APHIS 151 West Boylston Drive Worcester, MA 01606 508.852.8090 (o) 508.414.5673 (c) The USDA is an equal opportunity provider and employer. Federal Relay Service (Voice/TTY/ASCII/Spanish) 1-800-877-8339 This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. .