You should be able to use StringUtils.replace(), either before or after you split the OBX-5 segment up. For example, using
var obx5 = StringUtils.replace(message.getNode('OBX-5'), '-', '')
will create a variable called 'obx5' that contains the contents of OBX-5, but with all the hyphens removed. Without seeing the code you're using, it's difficult to show how this will integrate into your specific channel, but here's a sample that will cycle through all OBX segments and remove hyphens from all OBX-5 segments:
for (var i = 1; i <= message.getCount('OBX'); i++) {
message.setNode('OBX-5', StringUtils.replace(message.getNode('OBX-5', i), '-', ''), i);
}