Python web scraping
<p>On using this regular expression in python :</p>

<p><code>pathstring = '&lt;span class="titletext"&gt;(.*)&lt;/span&gt;'</code><br>
<code>pathFinderTitle = re.compile(pathstring)</code></p>

<p>My output is:</p>

<pre><code>Govt has nothing to do with former CAG official RP Singh:
Sibal&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div class="esc-lead-article-source-wrapper"&gt;
&lt;table class="al-attribution single-line-height" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td class="al-attribution-cell source-cell"&gt;
&lt;span class='al-attribution-source'&gt;Times of India&lt;/span&gt;&lt;/td&gt;
&lt;td class="al-attribution-cell timestamp-cell"&gt;
&lt;span class='dash-separator'&gt;&amp;nbsp;- &lt;/span&gt;
&lt;span class='al-attribution-timestamp'&gt;&amp;lrm;46 minutes ago&amp;lrm;
</code></pre>

<p>The text find should have stopped at first "&lt; /span>". </p>

<p>Please suggest whats wrong here.</p>
