title: Question about the String.replaceAll() and String.replaceFirst() method
body: <p>I need to do a simple string replace operation on a segment of string. I ran into the following issue and hope to get some advice.</p>
  
  <ol>
  <li>In the original string I got, I can replace the string such as <code>&lt;div class="more"&gt;</code> to something else.</li>
  <li>BUT, in the same original string, if I want to replace a much long string such as the following, it won’t work.  Nothing gets replaced after the call.</li>
  </ol>
  
  <p><code>&lt;div class="more"&gt;&lt;a href="http://SERVER_name/profiles/atom/mv/theboard/entries/related.do?email=xyz.com&amp;amp;ps=20&amp;amp;since=1273518953218&amp;amp;sinceEntryId=abc-def-123-456"&gt;More...&lt;/a&gt;&lt;/div&gt;</code></p>
  
  <p>I tried these two methods:</p>
  
  <pre><code>originalString.replaceFirst(moreTag, newContent);
  originalString.replaceAll(moreTag, newContent);
  </code></pre>
  
  <p>Thanks in advance.</p>