Veteran TD's and Maya guys will tell you how easy it is and that there are so many ways to deal with them and this and that. They are correct. However, they are still a giant, giant pain in the ass.
Thankfully there's a simple trick to remove namespaces from using the tokenize MEL command.
What tokenize does is split a string into multiple parts using a character(s) as the splitting point. For example, if an object is named this_Object if you were to tokenize it and split it using the character "_" than you would end up with two tokens: "this" and "Object".
We know that if an object has a namespace, or in some cases multiple namespaces that the object name will always be prefixed with the namespace and a colon. (:)
So, let's tokenize it out using a colon.
string $objectName = "Character:r_arm_CTRL" ; // Our Object Name
string $buffer[] ; // Create Empty Array To Hold Tokens
tokenize $objectName ":" $buffer ; // Split $objectName by ":"
// Now...
string $namespace = $buffer[0] ; // "Character"
string $object = $buffer[1] ; // "r_arm_CTRL"
With this example we've done a basic namespace removal. However, this is prone to errors for multiple reasons. What if you have multiple namespaces? By hardcoding which index you're getting from $buffer you will end up potentially grabbing the wrong data. A way around this is to use a programming trick to always grab the very last item in an array. As with namespaces, we always know the last item will be the object itself so we'll end up with the correct string.
string $objectName = "Character:r_arm_CTRL" ;
string $buffer[] ;
tokenize $objectName ":" $buffer ;
string $objectWithoutNamespace = $buffer[size($buffer)-1] ;
By getting the size of the array, and subtracting one, you'll end up with the last index of a zero-based array. If it were Maxscript, arrays are one-based (they start with one, not zero) so you wouldn't need to subtract one from the size.
(If you're curious, the equivalent of tokenize in Maxscript is filterString)
So there you are, a quick, easy, non-dirty way of getting rid of namespaces in an object's name.