finding a special path string in HTML text in python
Question: 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.

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

The code is:

    
    
    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))
    

The actual text that I want to get is:

**/images/branding/googleg/1x/googleg_standard_color_128dp.png**

I'd really appreciate it if someone could point me in the right direction


Answer: this can help you:

    
    
    re.search(r'\"\/.+\"',Text).group(0)
    

result:

    
    
    >>> re.search(r'\"\/.+\"',Text).group(0)
    '"/images/branding/googleg/1x/googleg_standard_color_128dp.png"'
    

