What's the best way to format a string so that everything before the last "\" is deleted?