I think what you are trying to do is input a word and see if any part of that word matches what you have in a text file. now do you want only sequential letters to make the work or can it be any combination of letters in the inputted word?
Example:
sequential search
"individual" has "in", "divi" and "dual"
or any combination
"individual" has "in", "dual" , "dial", "dan" and "lad"
If you only want sequential letters to make words then you are going to need three loops to accomplish this. The first to control where in the string to start from. The second loop will start from there and go on to the end of the string getting sub strings along the way. The third loop would go through the words in the file and see if the sub string matches any of the strings in the file. At least this is how I would go about.
If you want any combination of letters in the inputted word let us know and we can give you a hand thinking it through. Unless my first assumption was wrong and none of this applies.