title: (?i) regex outcome - "Nothing" is getting replaced by Something
body: <p>I was trying case insensitive pattern matching. For the sake of learning i tried the following and finding it difficult to analyze what is happening. </p>
  
  <pre><code>   String x = "Hello";
     String pattern = "(?i)";
     System.out.println(x.replaceAll(pattern, "&lt;/code&gt;")); 
  </code></pre>
  
  <p>Output is </p>
  
  <pre><code>&lt;/code&gt;H&lt;/code&gt;e&lt;/code&gt;l&lt;/code&gt;l&lt;/code&gt;o&lt;/code&gt;
  </code></pre>
  
  <p>Can someone please explain this behaviour</p>