title: python re.sub newline multiline dotall
body: <p>I have this CSV with the next lines written on it (please note the newline /n):</p>
  
  <pre><code>"&lt;a&gt;https://google.com&lt;/a&gt;",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,Dirección
  </code></pre>
  
  <p>I am trying to delete all that commas and putting the address one row up. Thus, on Python I am using this:</p>
  
  <pre><code>with open('Reutput.csv') as e, open('Put.csv', 'w') as ee:
      text = e.read()
      text = str(text)
      re.compile('&lt;a/&gt;*D', re.MULTILINE|re.DOTALL)
      replace = re.sub('&lt;a/&gt;*D','&lt;a/&gt;",D',text) #arreglar comas entre campos
      replace = str(replace)
      ee.write(replace)
  f.close()
  </code></pre>
  
  <p>As far as I know, re.multiline and re.dotall are necessary to fulfill /n needs. I am using re.compile because it is the only way I know to add them, but obviously compiling it is not needed here.</p>
  
  <p>How could I finish with this text?</p>
  
  <pre><code>"&lt;a&gt;https://google.com&lt;/a&gt;",Dirección
  </code></pre>