Yep, that's the exact code I'm using I will try to re-install it because I remember writing it like that because I wanted that functionality. Although lately in Max 2017 it's just been deleting the first two characters regardless and I have no clue how that could change. Edit: Okay just reinstalled the script and swapped…
I don't see how it could happen unless you've overwritten your macroscript at some point.When you evaluate a macroscript, it gets copied in some Max folder and is executed from there. Maybe you've evaluated an old version of your script and didn't reevaluate after changing it.
Is that the exact code you're using? I tried it and it works like it should in Max 2017, it removes ALL leading "o" "_" characters from the string. Box001 = Box001, _Box001 = Box001, o_Box001 = Box001 and __oooo___Box001 = Box001.