title: Java regex case insensitivity not working
body: <p>I'm trying to remove some words in a string using regex using below program. Its removing properly but its considering only case sensitive. How to make it as case insensitive. I kept <code>(?1)</code> in <code>replaceAll</code> method but it didn't work.</p>
  
  <pre><code>package com.test.java;
  
  public class RemoveWords {
  
      public static void main(String args[])
      {
  
          // assign some words to string
  
          String sample ="what Is the latest news today in Europe? is there any thing special or everything is common.";
  
              System.out.print(sample.replaceAll("( is | the |in | any )(?i)"," "));
      }
  }
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>what Is latest news today  Europe? there thing special or everything common.
  </code></pre>