as expected gsub starts replacing string occurrences from left to right, but I assumed I could easily reverse this behavior by using a negative 1 as forth argument in case I wanted to only replace only the very last _L, for example like this:
string.gsub("Bone_L_L", "_L", "_R", -1)
But turns out it replaces all the occurrences instead, which is not useful at all from my POV, since that's already the default behavior...
I guess I could somehow get what I want by reversing the involved strings in my function with the help of string.reverse(), but I wanted to be sure I was not missing a... handier way?