Python usage of regular expressions
<p>How can I extract <em>string1#string2</em> from the bellow line?</p>

<pre><code>&lt;![CDATA[&lt;html&gt;&lt;body&gt;&lt;p style="margin:0;"&gt;string1#string2&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;]]&gt;
</code></pre>

<p>The # character and the structure of the line is always the same.</p>

<pre><code>re.search(r'[^&gt;]+#[^&lt;]+',s).group()
</code></pre>

python regex