title: How do I extract definitions from a html file?
body: <p>I'm trying to practice with regular expressions by extracting function definitions from Python's standard library <a href="https://docs.python.org/3.6/library/functions.html" rel="nofollow noreferrer" title="built-in functions">built-in functions</a> page. What I do have so far is that the definitions are generally printed between <code>&lt;dd&gt;&lt;p&gt;</code> and <code>&lt;/dd&gt;&lt;/dl&gt;</code>. When I try</p>
  
  <pre><code>import re
  fname = open('functions.html').read()
  deflst = re.findall(r'&lt;dd&gt;&lt;p&gt;([\D3]+)&lt;/dd&gt;&lt;/dl&gt;', fhand)
  </code></pre>
  
  <p>it doesn't actually stop at <code>&lt;/dd&gt;&lt;/dl&gt;</code>. This is probably something very silly that I'm missing here, but I've been really having a hard time trying to figure this one out. </p>