Just a snippet. I needed to grab the data between <LI> list item </LI> tags. Highly annoying that I couldn't find it anywhere else.
1 2 3 4
import re output = re.compile('<li>(.*?)</li>', re.DOTALL | re.IGNORECASE).findall(input)
This is useful for grabbing the data you need if it's in an html page and you don't want to bother learning the INSANELY badly documented html or sgml parsers in python.