Compare strings

I have this textfile with a lot of words in it.
One word on each line.

How can I compare a flash string to the lines in the textfile?
I want to know if the string matches any of the lines in the file.