I have thousands of large strings that I need to compare / match against another set of hundreds of smaller phrases and words, to see if the phrases are contained in the large String.
What is the quickest way of doing this? Do I just use a String.indexOf(...), or String.matches(regularExpression), or do I go down to the byte level etc etc.
(all matches must be case insensitive; both "HI" and "hi" phrases must be found in a String "Hi there".)
Any tips?
Edit: by "quickest", I mean in terms of performance.