Regular Expressions in Python-Scraping Data from website
<p>I am new to Python and I trying to pull in xml files from a website and load them into a database. I have been using the Beautiful Soup module in Python but I cannot pull in the specific xml file that I want. 
In the website source code it looks as follows:</p>

<pre><code>&lt;a href="ReportName I want 20130101.XML"&gt;ReportName.XML&lt;/a&gt;
&lt;a href="ReportName I want 20120101.XML"&gt;ReportName.XML&lt;/a&gt;
&lt;&lt;a href="ReportName I dont want 123.XML"&gt;ReportName.XML&lt;/a&gt;
</code></pre>

<p>The following shows the code I have in Python. This brings back everything with the 'href' tag whereas I want to filter the files on the 'Report I want name dddddddd'. I have tried using regular expressions such as 'href=\s\w+' for example but to no avail as it returns NONE. Any help is appreciated</p>

<pre><code>from bs4 import BeautifulSoup
import urllib
import re

webpage=("http://www.example.com")
response=urllib.urlopen(webpage).read()
soup=BeautifulSoup(response)



for link in soup.find_all('a'):
   print(link.get('href')
</code></pre>

<p>When I use Python it findall('href') it pulls back the entire string but I want to filter just the xml aspect. I have tried variations of the code such as findall('href\MarketReports') and findall('href\w+') put this returns "None" when I run the code.</p>

<p>Any help is appreciated</p>
