On Mar 24, 7:56 pm, Tess <[EMAIL PROTECTED]> wrote: > > Anyhow, a simple regex took care of the issue in BS: > > for i in soup.findAll(re.compile('^p|^div'),align=re.compile('^center| > ^left')): > print i >
But I thought you only wanted certain combinations: "My goal is to extract all elements where the following is true: <p align="left"> and <div align="center">." Wont this solution give you false hits, such as <p align="center"> and <div align="left"> ? -- Paul -- http://mail.python.org/mailman/listinfo/python-list