Searching and reading data as variables

Hopefully someone can help me out, I’m trying to figure out how to search through a .txt file to find a match from a input put in through flash and return which line its in the text file…ie: input, “flash” and i search through the .txt file to find a match and return what line its on?

And my second part of the question, how can I use cordinates to search through a .txt file and return the data as a integer? Basically what I’m trying to do is have a list of data setup with a name and value beside it and be able to retrieve a specific value for each name, ie:

flash 4563
kirupa 2305

blah 2350

I’m not too familiar with actionscript, I’ve done some java a few years ago, and I’ve noticed some similarities, so hopefully this won’t be all new to me. If someone can help me out with this, or point me to a tutorial of some sort, i’d appreciate it