You can pass a regular expression to the text parameter of findAll
, like so:
import BeautifulSoup
import re
columns = soup.findAll('td', text = re.compile('your regex here'), attrs = {'class' : 'pos'})
More Related Contents:
- How to find elements by class
- BeautifulSoup webscraping find_all( ): finding exact match
- How find specific data attribute from html tag in BeautifulSoup4?
- Exclude unwanted tag on Beautifulsoup Python
- How to scrape dynamic webpages by Python
- retrieve links from web page using python and BeautifulSoup [closed]
- Scraping: SSL: CERTIFICATE_VERIFY_FAILED error for http://en.wikipedia.org
- Using BeautifulSoup to extract text without tags
- Scraping Google Finance (BeautifulSoup)
- How to scrape a website which requires login using python and beautifulsoup?
- Beautiful Soup findAll doesn’t find them all
- Can I remove script tags with BeautifulSoup?
- BeautifulSoup findAll() given multiple classes?
- How can I get href links from HTML using Python?
- BeautifulSoup innerhtml?
- pandas read_html ValueError: No tables found
- Scrape multiple pages with BeautifulSoup and Python
- Understand the Find() function in Beautiful Soup
- python beautifulsoup iframe document html extract
- BeautifulSoup: extract text from anchor tag
- How can I get all the plain text from a website with Scrapy?
- How to scrape only visible webpage text with BeautifulSoup?
- How to find all comments with Beautiful Soup
- Can bs4 get the dynamic content of a webpage if requests can’t?
- Python regular expression for HTML parsing
- BeautifulSoup: Get the contents of a specific table
- How to find the comment tag with BeautifulSoup?
- BeautifulSoup return unexpected extra spaces
- BeautifulSoup returns None even though the element exists
- How to get inner text value of an HTML tag with BeautifulSoup bs4?