If you want to trim iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.10101 down to just ifName you could use something similar to this. Obviously you would have to change the if and add a second gsub to strip the leading elements of the name.