title: Python: sub pattern doesn't replace all patterns found
body: <p>I am trying to get this following code:    </p>
  
  <pre><code>pattern = r"#(.*?)#"
  pattern_obj = re.compile(pattern, re.MULTILINE)
  translation = pattern_obj.sub("&lt;li&gt;\\1&lt;/li&gt;", translation)
  </code></pre>
  
  <p>to find any text surrounded by #. It replaces the first instance</p>
  
  <pre><code>&gt;&gt;&gt;&lt;li&gt; TEXT &lt;/li&gt;
  
  # More TEXT #
  
  # Even more TEXT #
  </code></pre>
  
  <p>Can someone please help me?</p>
  
  <p>Thanking you in advance!</p>
  
  <p>EDIT:
  I just fixed the issue like so.</p>
  
  <pre><code>pattern = r"#([^#]*)#"
  pattern_obj = re.compile(pattern, re.MULTILINE)
  translation = pattern_obj.sub("&lt;li&gt;\\1&lt;/li&gt;", translation)
  </code></pre>