title: Regex: using dot all flag, how to prefix each line?
body: <p>What would be the proper regex to prefix each line?</p>
  
  <p>Say i have the the input data:</p>
  
  <pre><code>SOME OTHER DATA
  
  TABLE
  ROW
  ROW
  ROW
  END
  
  SOME OTHER DATA
  </code></pre>
  
  <p>Im only interested in what is between and including TABLE and END. </p>
  
  <p>In php you can write a regex like the following /TABLE.*?END/s which would match the first occurence of TABLE to the first occurence of END. But is there a way i can prefix each line with %? so the result would become:</p>
  
  <pre><code>SOME OTHER DATA
  
  %TABLE
  %ROW
  %ROW
  %ROW
  %END
  
  SOME OTHER DATA
  </code></pre>
  
  <p>Any help is appreciated.</p>