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.
String x = "Hello";
String pattern = "(?i)";
System.out.println(x.replaceAll(pattern, "</code>"));
Output is
</code>H</code>e</code>l</code>l</code>o</code>
Can someone please explain this behaviour