title: Remove whitespace before [quote-tag and after [/quote]
body: <p>I need to remove whitespaces/newlines from a string but only before a [quote-tag and after a [/quote]. Other whitespaces/newlines should be untouched.</p>
  
  <p>Example:</p>
  
  <pre><code>[quote=lorem]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ut aliquam elit, nec lobortis neque.[/quote]
  
  Nunc ultrices, eros a fringilla varius, metus arcu rutrum libero, quis pulvinar sapien lorem et mauris. Nullam vitae nisi tristique, congue ipsum ut, lobortis augue.
  
  Nam tempus justo hendrerit, feugiat ipsum eget, pellentesque eros. Fusce vel pretium felis, nec euismod nisl.
  
  
  
  
  
  
  
  
  [quote=lipsum]Sed efficitur malesuada eleifend.[/quote]
  
  
  
  Ut accumsan nulla sed lacus luctus, in venenatis diam tristique.
  </code></pre>
  
  <p>I want this to become:</p>
  
  <pre><code>[quote=lorem]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ut aliquam elit, nec lobortis neque.[/quote]
  Nunc ultrices, eros a fringilla varius, metus arcu rutrum libero, quis pulvinar sapien lorem et mauris. Nullam vitae nisi tristique, congue ipsum ut, lobortis augue.
  
  Nam tempus justo hendrerit, feugiat ipsum eget, pellentesque eros. Fusce vel pretium felis, nec euismod nisl.
  [quote=lipsum]Sed efficitur malesuada eleifend.[/quote]
  Ut accumsan nulla sed lacus luctus, in venenatis diam tristique.
  </code></pre>