Hi All, Am a newbie to AS and am having trouble trying to do what I hoped would be very easy! I am trying to search a text file on a line by line basis looking for a string which is midway along the line of text. Each time the string is found I need it to return the first few characters of the line it was found on and then move on checking each subsequent line until the end of the file. At the end of this I would like to have a variable containing all the matches. Any examples of how to make the loop work would be greatly appreciated! Thanks, Nelson.