Hello, I have a list of strings that mostly end with the word "in" and I need to remove the "in" from the end of each string. I can't just delete every instance of "in" because it is also legitimately present in some strings.
I used
value.partition(smartSplit(value," ")[-1])[0]
and it mostly worked, but it removed everything in the string after the first instance of "in." Is there a way to make it remove only the actual last word, not the first instance of a match with the last word plus everything after it?
