title: Find hashtags with in specified part of website
body: <p>I would like to extract all (in this example two) hast-tags from a web-page.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="predefinition"&gt;
              &lt;p class="part1"&gt;
                &lt;span class="part1-head"&gt;Entries:&lt;/span&gt;
                  &lt;a class="pr" href="/go_somewhere/"&gt;#hashA with space&lt;/a&gt;, 
                  &lt;a class="pr" href="/go_somewhere/"&gt;#hashBwithoutsace&lt;/a&gt;,
              &lt;/p&gt;
              &lt;span class="part2"&gt;Boundaries:&lt;/span&gt;
              &lt;p&gt;some boundary statement&lt;/p&gt;
          &lt;/div&gt;        
          &lt;div class="wrapper"&gt; &lt;!– I only want to search here–&gt;
              &lt;p class="part1"&gt;
                &lt;span class="part1-head"&gt;Entries:&lt;/span&gt;
                  &lt;a class="pr" href="/go_somewhere/"&gt;#hash1 with space&lt;/a&gt;, &lt;!– I only want to find this–&gt;
                  &lt;a class="pr" href="/go_somewhere/"&gt;#hash2withoutsace&lt;/a&gt;, &lt;!– and this–&gt;
              &lt;/p&gt;
              &lt;span class="part2"&gt;Boundaries:&lt;/span&gt;
              &lt;p&gt;some other boundary statement&lt;/p&gt;
          &lt;/div&gt;        
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But I am only interested in the hash-tags in one branch (in this example wrapper): "#hash1 with space" and "#hash2withoutsace". Right now my code looks like this:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import io
  import re
  
  f = io.open("minimal.html", mode="r", encoding="utf-8")
  contents = f.read()
  soup = BeautifulSoup(contents, 'lxml')
  mydivs = soup.findAll("a", {"class": "pr"})
  
  for div in mydivs:
      print(re.findall(r'(?i)\#\w+', str(div)))
  </code></pre>
  
  <ul>
  <li>How do I focus my search on the "wrapper" div?</li>
  <li>And how to I include hashtags with spaces?</li>
  </ul>