title: Search and Replace in HTML with BeautifulSoup
body: <p>I want to use BeautfulSoup to search and replace <code>&lt;\a&gt;</code> with <code>&lt;\a&gt;&lt;br&gt;</code>. I know how to open with <code>urllib2</code> and then parse to extract all the <code>&lt;a&gt;</code> tags. What I want to do is search and replace the closing tag with the closing tag plus the break. Any help, much appreciated. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I would assume it would be something similar to:</p>
  
  <pre><code>soup.findAll('a').
  </code></pre>
  
  <p>In the documentation, there is a:</p>
  
  <pre><code>find(text="ahh").replaceWith('Hooray')
  </code></pre>
  
  <p>So I would assume it would be along the lines of:</p>
  
  <pre><code>soup.findAll(tag = '&lt;/a&gt;').replaceWith(tag = '&lt;/a&gt;&lt;br&gt;')
  </code></pre>
  
  <p>But that doesn't work and the python help() doesn't give much</p>