title: Match everything until end markdown tag
body: <p>I want to match the contents of a markdown tag, but I have trouble when there are multiple equal tags in the string.</p>
  
  <p><code>string = "[caixa]text here[/caixa] more text [caixa] text [/caixa]"</code></p>
  
  <p>What I want is iterate over the tags (including the tag itself), which in this case would be:</p>
  
  <p><code>match1: "[caixa]text here[/caixa]"</code></p>
  
  <p><code>match2: "[caixa] text [/caixa]"</code></p>
  
  <p>I've tried with negative lookahead, like <code>\[caixa\].+(?&lt;!\[\/caixa\])\[\/caixa\]</code>, but it matches the whole text, from the initial opening tag to the last closing tag.</p>
  
  <p>I am using re library in Python. Any help is appreciated. </p>