return function(q)local U=q:sub(#q-(((q:reverse()):find("\037\117")or#q+1)-1))U=U:gsub("\037\100\043\036","")return U end


return function (str)
	-- Get the last word in the PascalCase name (e.g. Arm from UpperLeftArm)
	local lastWord = str:sub(#str - ((str:reverse():find("%u") or #str+1) - 1))
	-- Remove trailing numbers from the name
	lastWord = lastWord:gsub("%d+$", "")
	
	return lastWord
end
