I\'m using BeautifulSoup. I have to find any reference to the tags with id like: post-#. For example:
tags with id like: post-#. For example:
post-#
For example:
You can pass a function to findAll:
>>> print soupHandler.findAll('div', id=lambda x: x and x.startswith('post-')) [..., ...]
Or a regular expression:
>>> print soupHandler.findAll('div', id=re.compile('^post-')) [..., ...]