how to use beautiful soup to find all id's having a specific string code example
Example 1: how to use beautiful soup to find all id's having a specific string
import re
[...]
soupHandler.findAll('div', id=re.compile("^post-\d+"))
Example 2: how to use beautiful soup to find all id's having a specific string
>>> print soupHandler.findAll('div', id=re.compile('^post-'))
[<div id="post-45">...</div>, <div id="post-334">...</div>]