Here is the code to do set OBR-4.1 to what is in the brackets of OBR-4.2
var obrCount = message.getCount('OBR');
for (var i = 1; i <= obrCount; i++) {
if (StringUtils.isNotBlank(StringUtils.substringBetween(message.getNode('OBR-4.2', i), '[', ']'))) {
message.setNode('OBR-4.1', StringUtils.substringBetween(message.getNode('OBR-4.2', i), '[', ']'), i);
}
}