title: using regular expressions with java string.replace
body: <p>I have two questions.</p>
  
  <p>1:</p>
  
  <p>String = xx yy **</p>
  
  <p>I want to remove "xx " so String becomes = "yy *<em>"  (xx/yy is fixed and *</em> can be anything)
  I tried something like this but it does not work:</p>
  
  <pre><code>string.replaceall("^(xx )$", "");
  </code></pre>
  
  <p>Isn't this supposed to replace the first occurence of "xx " with "" ?</p>
  
  <p>SOLVED(by Lucas)</p>
  
  <p>2:</p>
  
  <p>String = xx yy **</p>
  
  <p>I want to remove " yy **" so that String becomes = "xx"
  I thought something like this, but since the first doesnt work i suspoect this will not too.</p>
  
  <pre><code>string.replaceall("^( yy)*$", "");
  </code></pre>
  
  <p>UNSOLVED</p>
  
  <p>I actually phrased this one insufficiently,</p>
  
  <p>xx should be **</p>
  
  <p>so xx is not fixed</p>
  
  <p>** yy **
  should become ** which is the first **</p>