What's the best way to write this regular expression?

John Salerno johnjsal at gmail.com
Wed Mar 7 00:33:38 CET 2012


On Tuesday, March 6, 2012 5:05:39 PM UTC-6, John Salerno wrote:
> > Anything that allows me NOT to use REs is welcome news, so I look forward to learning about something new! :)
> 
> I should ask though...are there alternatives already bundled with Python that I could use? Now that you mention it, I remember something called HTMLParser (or something like that) and I have no idea why I never looked into that before I messed with REs.
> 
> Thanks.

::sigh:: I'm having some trouble with the new Google Groups interface. It seems to double post, and in this case didn't post at all. If it did already, I apologize. I'll try to figure out what's happening, or just switch to a real newsgroup program.

Anyway, my question was about Beautiful Soup. I read on the doc page that BS uses a parser, which html.parser and lxml are. So I'm guessing the difference between them is that the parser is a little more "low level," whereas BS offers a higher level approach to using them? Is BS easier to write code with, while still using the power of lxml?



More information about the Python-list mailing list