python re - a not needed

Max M maxm at mxm.dk
Thu Dec 16 04:52:26 EST 2004


kepes.krisztian wrote:

> I want to get infos from a html, but I need all chars except <.
> All chars is: over chr(31), and over (128) - hungarian accents.
> The .* is very hungry, it is eat < chars too.

Instead of writing ad-hoc html parsers, use BeautifulSoup instead.

http://www.crummy.com/software/BeautifulSoup/

I will most likely do what you want in 2 or 3 lines of code.

-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Python-list mailing list