in reply to find string in file

You would do better (IMO) if you read Pattern Matching, Regular Expressions, and Parsing and tried to write the code yourself.