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