title: Add constants to start and end of "file" after multiple replacements
body: <p>I have already found how to do multiple replacements, bu replacing</p>
  
  <p><code>(from1)|(from2).....</code></p>
  
  <p>with</p>
  
  <p><code>(?1to1)(?2to2)</code></p>
  
  <p>For example, if I have:</p>
  
  <p><code>hello all! I think saying hello to all is a nice way to introduce oneself.</code></p>
  
  <p>and I replace </p>
  
  <p><code>(hello)|(all)</code></p>
  
  <p>with</p>
  
  <p><code>(?1greetings)(?2everyone)</code></p>
  
  <p>I get</p>
  
  <p><code>greetings everyone! I think saying greetings to everyone is a nice way to introduce oneself.</code></p>
  
  <p>Now, I want to add a string at the very beginning and end of file - not each line. So, in that case, my desired result is:</p>
  
  <p><code>StartOfAllgreetings everyone! I think saying greetings to everyone is a nice way to introduce oneself.EndOfAll</code></p>
  
  <p>Can you help me with this? Things that I have tried unsuccesfully include using $,\z,\Z to identify the end of line, and using branch reset groups like this (?|(hello)|(all))* </p>