title: Using BeautifulSoup to find a HTML tag that contains certain text
body: <p>I'm trying to get the elements in an HTML doc that contain the following pattern of text: #\S{11}</p>
  
  <pre><code>&lt;h2&gt; this is cool #12345678901 &lt;/h2&gt;
  </code></pre>
  
  <p>So, the previous would match by using:</p>
  
  <pre><code>soup('h2',text=re.compile(r' #\S{11}'))
  </code></pre>
  
  <p>And the results would be something like:</p>
  
  <pre><code>[u'blahblah #223409823523', u'thisisinteresting #293845023984']
  </code></pre>
  
  <p>I'm able to get all the text that matches (see line above). But I want the parent element of the text to match, so I can use that as a starting point for traversing the document tree. In this case, I'd want all the h2 elements to return, not the text matches.</p>
  
  <p>Ideas?</p>