title: Using re.search in python filter function
body: <p>I am not able to use re.search inside a filter expression.</p>
  
  <p>I am trying to use re.search to extract the href values from a list where each element is a html line.</p>
  
  <p>Here is what I am doing:</p>
  
  <pre><code>&gt;&gt;&gt; filter(lambda html_line: re.search('.*a href=\"([^\"]*).*', html_line), data)
  
  [u'Directory Feb 28 23:57 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.02.28"&gt;2014.02.28&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 01 23:59 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.01"&gt;2014.03.01&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 02 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.02"&gt;2014.03.02&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 03 23:59 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.03"&gt;2014.03.03&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 04 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.04"&gt;2014.03.04&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 05 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.05"&gt;2014.03.05&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 06 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.06"&gt;2014.03.06&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 07 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.07"&gt;2014.03.07&lt;/a&gt;&lt;/b&gt;'
   u'Directory Mar 08 23:50 &lt;b&gt;&lt;a href="/MyApp/LogBrowser?type=crawler/2014.03.08"&gt;2014.03.08&lt;/a&gt;&lt;/b&gt;']
  </code></pre>
  
  <p>My re.search call seems to be working correctly.</p>
  
  <p>For example, this works:</p>
  
  <pre><code>&gt;&gt;&gt; for html_line in data:
      print re.search('.*a href=\"([^\"]*).*', html_line).group(1)
  
  /MyApp/LogBrowser?type=crawler/2014.02.28
  /MyApp/LogBrowser?type=crawler/2014.03.01
  /MyApp/LogBrowser?type=crawler/2014.03.02
  /MyApp/LogBrowser?type=crawler/2014.03.03
  /MyApp/LogBrowser?type=crawler/2014.03.04
  /MyApp/LogBrowser?type=crawler/2014.03.05
  /MyApp/LogBrowser?type=crawler/2014.03.06
  /MyApp/LogBrowser?type=crawler/2014.03.07
  /MyApp/LogBrowser?type=crawler/2014.03.08
  </code></pre>