title: Removing strings from another string in java
body: <p>Lets say I have this list of words:</p>
  
  <pre><code> String[] stopWords = new String[]{"i","a","and","about","an","are","as","at","be","by","com","for","from","how","in","is","it","not","of","on","or","that","the","this","to","was","what","when","where","who","will","with","the","www"};
  </code></pre>
  
  <p>Than I have text</p>
  
  <pre><code> String text = "I would like to do a nice novel about nature AND people"
  </code></pre>
  
  <p>Is there method that matches the stopWords and removes them while ignoring case; like this somewhere out there?:</p>
  
  <pre><code> String noStopWordsText = remove(text, stopWords);
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code> " would like do nice novel nature people"
  </code></pre>
  
  <p>If you know about regex that wold work great but I would really prefer something like commons solution that is bit more performance oriented. </p>
  
  <p>BTW, right now I'm using this commons method which is lacking proper insensitive case handling:</p>
  
  <pre><code> private static final String[] stopWords = new String[]{"i", "a", "and", "about", "an", "are", "as", "at", "be", "by", "com", "for", "from", "how", "in", "is", "it", "not", "of", "on", "or", "that", "the", "this", "to", "was", "what", "when", "where", "who", "will", "with", "the", "www", "I", "A", "AND", "ABOUT", "AN", "ARE", "AS", "AT", "BE", "BY", "COM", "FOR", "FROM", "HOW", "IN", "IS", "IT", "NOT", "OF", "ON", "OR", "THAT", "THE", "THIS", "TO", "WAS", "WHAT", "WHEN", "WHERE", "WHO", "WILL", "WITH", "THE", "WWW"};
   private static final String[] blanksForStopWords = new String[]{"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
  
   noStopWordsText = StringUtils.replaceEach(text, stopWords, blanksForStopWords);     
  </code></pre>