title: Extract original string position from beautifulsoup element
body: <p>When parsing long complicated html documents with <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/" rel="noreferrer">beautifulsoup</a>, it's sometimes useful to get the exact position in the original string where I've matched an element. I can't simply search for the string, as there may be multiple matching elements and I would lose bs4's ability to parse the DOM. Given this minimal working example:</p>
  
  <pre><code>import bs4
  
  html = "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt;  &lt;i&gt;World&lt;/i&gt;&lt;/div&gt;"
  soup = bs4.BeautifulSoup(html,'lxml')
  
  # Returns 22
  print html.find("World")
  
  # How to get this to return 22?
  print soup.find("i", text="World")
  </code></pre>
  
  <p>How can I get the element extracted by <code>bs4</code> to return 22?</p>