Skip to Content
0
Former Member
Feb 17, 2009 at 09:23 AM

split a string at the last '\'

1234 Views

Hi experts,

i have a string like str_a = 'C:\Documents and Settings\abc.def\asdfgh\abcde\filename.csv' and i want to split this string at the last backslash into

str_1 = 'C:\Documents and Settings\abc.def\asdfgh\abcde\' and

str_2 = 'filename.csv'

but i don't know how.

pls help and thanks a lot!