Regular Expressions

Jens Thiede at
Sat Aug 14 17:47:09 CEST 2004

What is the easiest way to generate a list that contains all the 
remnants of re.findall (the inverse of the following).

 >>> file = open("index.html", "r")
 >>> data =
 >>> patern = re.compile("<title>(.*)</title>", re.S | re.I)
 >>> patern.findall(data)
['Damn Small Expansions!']
 >>> file.close()

re.split doesn't seem to work quite well, but then, I'm probably using 
it wrong.

Any suggestions?


More information about the Python-list mailing list