title: Remove spaces before newlines
body: <p>I need to remove all spaces before the newline character throughout a string.</p>
  
  <pre><code>string = """
  this is a line       \n
  this is another           \n
  """
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>string = """
  this is a line\n
  this is another\n
  """
  </code></pre>