title: replaceFirst() fails when replacing with "$"
body: <p>I don't understand why the "$" is special.</p>
  
  <pre><code>String str = "bla aa";
  String tag = "$";
  str = str.replaceFirst("aa", tag);
  
  Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
  </code></pre>
  
  <p>If I change the tag = "\\$", then it works fine.  But why does it need to be escaped?  thanks in advance.</p>