title: String.replaceAll(regex) makes the same replacement twice
body: <p>Can anyone tell me why</p>
  
  <pre><code>System.out.println("test".replaceAll(".*", "a"));
  </code></pre>
  
  <p>Results in</p>
  
  <pre><code>aa
  </code></pre>
  
  <p>Note that the following has the same result:</p>
  
  <pre><code>System.out.println("test".replaceAll(".*$", "a"));
  </code></pre>
  
  <p>I have tested this on java 6 &amp; 7 and both seem to behave the same way.
  Am I missing something or is this a bug in the java regex engine?</p>