1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
427 views
by cliff-s-2873 (240 points)
I have this so far but am not able to get the substring portion to work.

if (StringUtils.containsIgnoreCase(message.getNode('OBX['+(i+1)+']-6.1'), '*'))  {
            message.setNode('OBX['+(i+1)+']-6.1',StringUtils.substringAfter('OBX['+(i+1)+']-6.1', '*'));

1 Answer

0 votes

It appears that you need to get the node on the second line: using 'message.getNode('

if (StringUtils.containsIgnoreCase(message.getNode('OBX['+(i+1)+']-6.1'), '*'))  {
            message.setNode('OBX['+(i+1)+']-6.1',StringUtils.substringAfter(message.getNode('OBX['+(i+1)+']-6.1'), '*'));
}

by ben-s-7515 (13.0k points)
...