title: Java REGEX, remove two different type of comments from String
body: <p>I have a text with two types of comments. The ones delimited by <code>%</code> and the ones that start with <code>/*</code> and end with <code>*/</code>. For instance:</p>
  
  <blockquote>
    <p>INPUT1: <code>Sarah was going out. % Remember she usually doesn't go out % It was very cold.</code></p>
    
    <p>DESIRED_OUTPUT1: <code>Sarah was going out.  It was very cold.</code></p>
    
    <p>INPUT2: <code>Sarah was going out. /* Remember she usually doesn't go out */ It was very cold.</code></p>
    
    <p>DESIRED_OUTPUT2: <code>Sarah was going out.  It was very cold.</code></p>
    
    <p>INPUT3: <code>Charles knocked on the door and a woman 
    opened it. % Hmm, is this good... /* Not 
    sure */ Perhaps this should happen in 
    chapter 10 instead? % She looked at him.
    - Yes?, she said.</code></p>
    
    <p>DESIRED_OUTPUT3: <code>Charles knocked on the door and a woman 
    opened it.  She looked at him.
    - Yes?, she said.</code></p>
    
    <p>INPUT4: <code>Charles knocked on the door and a woman 
    opened it. % Hmm, is this good... /* Not 
    sure to 100% */ Perhaps this should happen 
    in chapter 10 instead? % She looked at him.
    - Yes?, she said.</code></p>
    
    <p>DESIRED_OUTPUT4: <code>Charles knocked on the door and a woman 
    opened it.  */ Perhaps this should happen 
    in chapter 10 instead?</code></p>
  </blockquote>
  
  <p>Basically, I would like that when encountering an opening comment mark, everything is removed until its respective closing comment mark (even if this means removing comment marks of the other type).</p>
  
  <p>If a comment is opened, either with <code>%</code> or <code>/*</code>, but never closed, the comment is assumed to continue until the end of the text. However, if it is present just a closing mark of this kind <code>*/</code> (because the opener was inside another comment and hence removed), it should be left in the text.</p>