I have an R string looks like:
0B5P4ZZ, 0B9P40Z, , , , , , , , , , , , , , , , , , , , , , , , , , , ,
How can I get rid of the space-commas at the end of this string so that it looks like the following?
0B5P4ZZ, 0B9P40Z
Thanks!
>Solution :
Another solution:
str_remove_all(s, "(, )+$")