I have a static \'large\' list of words, about 300-500 words, called \'list1\'
given a relatively short string str of about 40 words, what is the fastes
str
For faster regular expressions, use https://github.com/mudge/re2. It is a ruby wrapper for Google re2 https://code.google.com/p/re2/