change a string conditional

obantec support spam at nomail.net
Thu May 9 13:02:16 EDT 2002


Hi

I need to a piece of python code that will take a string which may or may
not begin with www and change it to lists.

eg. www.domain.com becomes lists.domain.com
but if domain1.com (no www) the it still becomes lists.domain1.com

an example of a pattern match will be enough.(I do a bit of perl but never
done any python)

mark






More information about the Python-list mailing list