finding a special path string in HTML text in python
<p>I'm trying to extract a path in an HTML file that I read.
In this case the path that I'm looking for is a logo from google's main site.</p>

<p>I'm pretty sure that the regular expression I defined is right, but I guess I'm missing something.</p>

<p>The code is:</p>

<pre><code>import re
import urllib
a=urllib.urlopen ('https://www.google.co.il/')
Text = a.read(250)
print Text
print '\n\n'
b= re.search (r'\"\/[a-z0-9 ]*',Text)

print format(b.group(0))
</code></pre>

<p>The actual text that I want to get is:</p>

<p><strong>/images/branding/googleg/1x/googleg_standard_color_128dp.png</strong></p>

<p>I'd really appreciate it if someone could point me in the right direction</p>

<p>this can help you:</p>

<pre><code>re.search(r'\"\/.+\"',Text).group(0)
</code></pre>

<p>result:</p>

<pre><code>&gt;&gt;&gt; re.search(r'\"\/.+\"',Text).group(0)
'"/images/branding/googleg/1x/googleg_standard_color_128dp.png"'
</code></pre>

python regex expression