11
Remove substring only at the end of string
I have a bunch of strings, some of them have ' rec'. I want to remove that only if those are the last 4 characters. So in other words I have somestring = 'this is some string rec' and I want it to become somestring = 'this is some string' …