title: RegEx to remove all \begin{gather}... \end{gather}
body: <p>I have a 6,200 hundred pages book with simple stuff like:</p>
  
  <pre><code>\begin{gather}
      A&gt;B,A=B,A&lt;B,A\leq B,A \geq B
  \end{gather}
  </code></pre>
  
  <p>or a bit more complicates:</p>
  
  <pre><code>\begin{gather}
      \begin{aligned}
      (a+b)^0&amp;=1\\
      (a+b)^1&amp;=1a+1b\\
      (a+b)^2&amp;=1a^2+2ab+1b^2\\
      (a+b)^3&amp;=1a^3+3a^2b+3ab^2+1b^3\\
      \end{aligned}
  \end{gather}
  </code></pre>
  
  <p>I'm trying to found the RegEx to remove all \begin{gather} \end{gather} environment (it's LaTeX). The best i have found by trial and error is:</p>
  
  <pre><code>(\\begin\{gather\}*\r?\n?.*)*\r?\n?.*(\r?\n?.*\\end\{gather\})
  </code></pre>
  
  <p>But it doesn't work :-(((</p>
  
  <p>Any help would be appreciate.</p>
  
  <p>Thx in advance</p>