search/replace in Python

Vamsee Krishna Gomatam vamsee_k at nospam.students.iiit.ac.in
Fri May 27 23:33:21 EDT 2005


Hello,
	I'm having some problems understanding Regexps in Python. I want
to replace "<google>PHRASE</google>" with
"<a href=http://www.google.com/search?q=PHRASE>PHRASE</a>" in a block of 
text. How can I achieve this in Python? Sorry for the naive question but 
the documentation is really bad :-(

Regards,
GVK



More information about the Python-list mailing list