I am trying to apply the below pattern:
Pattern p = Pattern.compile(".*?");
Matcher m = p.matcher("RAJ");
StringBuffer sb = new StringBufffer();
while(m.find()) {
m.appendReplacement(sb, "L");
}
m.appendTail(sb);
Expected Output : LLL Actual output : LRLALJL
Does the Dot(.) in the above regex match the position between the characters? If not why is the above output received