in reply to Quickest method for matching

If you find regexes slow and your searching is based on simple substrings, i suggest you use the builtin index instead.

as for the suggestion of using hashes, i'm not sure what the other person was suggesting, but i can't imagine they'd be faster than arrays for this. assuming your files are so large as to be slow in slurping into an array, i'd suggest not loading the file all at once, but instead iterating line by line and testing as you read. if you find your 2 matches, seek back to the beginning of the file and go on to the next substring.

- danboo