Filepath string manipulation help

mjakowlew mjakowlew at gmail.com
Wed Nov 2 20:32:30 CET 2005


Hi,

I'm trying to use some string manipulation from a file's path.

filepath='c:\documents\web\zope\file.ext'

I need to extract everthing after the last '\' and save it.
I've looked around and have tried the sub, search, match commands, but
I'm guessing '\' is set aside for switches. I need to know how to
search for the '\' in a string. I'm guessing it has something to do
with ASCII char codes.

Thanks in advance for any help,
mjakowlew




More information about the Python-list mailing list