python replace string with regexp
<p>I'm looking for a regexp to identify this for block in a template so I can provide text to replace this whole block</p>

<pre><code>&lt;div&gt;
 {% for link in links %}
     textext
 {% endfor %}
&lt;/div&gt;
</code></pre>

<p>and get something like this</p>

<pre><code>&lt;div&gt;
 mytext
&lt;/div&gt;
</code></pre>
