For my case, it's an web strings, but here I will just give an easier example:`
df = data.frame(Strings = c("abc/d/e/f////", "abc///", "/", "a/bc/d/////"))
The result that I want to gain is make the string which is ended with multiple "/" into there is only one "/" left at the end of the strings.
Which means that for the df I gave above, I want to get a result like this:
df_result = data.frame(Strings = c("abc/d/e/f/", "abc/", "/", "a/bc/d/"))
Thanks for answering my question.