title: How to replace a block of text using regex and java
body: <p>I have the same problem, but I need to get:</p>
  
  <pre><code>---- comment 3;comment 2;comment 1
  </code></pre>
  
  <p>From:</p>
  
  <pre><code>* (20-01-2012 12:53) : ---- comment 3&lt;br/&gt;* (20-01-2012 12:50) : comment 2&lt;br/&gt;* (20-01-2012 12:50) : comment 1
  </code></pre>
  
  <p>Which means my code should be: </p>
  
  <pre><code>string.replaceAll("\\*?.*?:", ";")
  </code></pre>
  
  <p>Correct?</p>
  
  <p>But this is replacing everything from the first * to the last : so I'm getting:</p>
  
  <pre><code>comment 1 
  </code></pre>
  
  <p>as the result. Help!</p>
  
  <p>Linked from <a href="https://stackoverflow.com/questions/3756657/replace-remove-string-between-two-character/8938079#8938079">Replace/remove String between two character</a></p>