title: Using Java Regex, how to check if a string contains any of the words in a set ?
body: <p>I have a set of words say  -- apple, orange, pear , banana, kiwi</p>
  
  <p>I want to check if a  sentence contains  any of the above listed words, and If it does , I want to find which word matched.  How can I accomplish this in Regex ?</p>
  
  <p>I am currently calling String.indexOf() for each of my set of words. I am assuming this is  not as efficient as a regex matching?</p>