To slightly generalize what others have told you, take a look at Re: Problem printing contents of file on how to open and loop through a specific file.
You'd have to modify the code to use the regular expression almut showed you.
Comment on Re: Locating "Patterns" in a log file (e.g. keywords, etc)