check if string contains any anagram of pattern