title: Multiline sed option?
body: <p>I want to remove all the text between (and including) two strings in all the files in a directory. For an example, the files look something like this:</p>
  
  <pre><code>flag
  bla bla bal
  bla bla bla
  endflag
  
  etc..
  </code></pre>
  
  <p>This is what I'm doing with sed:</p>
  
  <pre><code>sed -i "s:flag.*endflag::m" *
  </code></pre>
  
  <p>However, the 'm' option is not part of sed. All the other Stack Overflow threads on this topic resort to using perl, awk, or a sed wrapper to accomplish this. Isn't there a way to tell sed to match newline characters?</p>