String Manipulation

lamar_air lamar_air at hotmail.com
Tue Jul 15 16:23:09 EDT 2003


I need a piece of code that takes a string like this string1 =
"aaa/bbb/ccc/dd" and extracts a string containting the character after
the last "/"

So for this example the result would be "dd"

like this:
for i=0; string1.right(i) != '/'; i++

result = string1.mid(i, string1.length())

but in python.




More information about the Python-list mailing list