Change the SET
line to:
SET !VAR1 EVAL("var s=\"{{!CLIPBOARD}}\"; s = s.split(\"(B)\"); var r = s[1];r ")
split
doesn't modify the string it is called from. Also, I removed the limit of 1
you passed in to the split
method, because that will make it only return the first index of the resulting array created by the split. In your example, it would return [Abcde ]
, instead of [Abcde , FGHIJ]
Check out info about the split
method: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split