searchtext = re.compile('Table\\s+1', re.IGNORECASE)
foundtext = soup.find('p', text=searchtext)
table = foundtext.findNext('table')
How can I find a table after a text string using BeautifulSoup in Python?