Mailing List Archive

please help with simple regexp
I'm a beginner at Python, so this may be a stupid
question:

I have a string, for example, myString="the
Potato".
1. Convert it to all lowercase ("the potato")
2. Match it against a list of strings -
"potato,tomato,corn,etc...", extract "potato" (if
it matches with something on the list), then save
into myNewString.

Any help is greatly appreciated.

thanks,
Vadim



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
please help with simple regexp [ In reply to ]
From: viofis@my-deja.com

I'm a beginner at Python, so this may be a stupid
question:

I have a string, for example, myString="the
Potato".
1. Convert it to all lowercase ("the potato")
2. Match it against a list of strings -
"potato,tomato,corn,etc...", extract "potato" (if
it matches with something on the list), then save
into myNewString.

Any help is greatly appreciated.

thanks,
Vadim



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.