How to find the last element in a string

Thank you very much alamir. That really worked.