This looks like a bugĀ
The result should be:
Key 1|-|Hello 1|World 1|
My understanding is wrong, I just found the help documentation:
Note that delim is not a delimiter string. It is a set of possible delimiter characters
Macro Macro6
It would be nice to have a split function like #1 with the same functionality as PowerShell
The result should be:
Key 1|-|Hello 1|World 1|
My understanding is wrong, I just found the help documentation:
Note that delim is not a delimiter string. It is a set of possible delimiter characters
Macro Macro6
out
_s=
;Key 1
;-
;Hello 1
;World 1
;---
;Key 2
;-
;Hello 2
;
;World 2
;---
;Key 3
;-
;Hello 3
;World 3
_s.findreplace("[]" "|")
out _s
ARRAY(str) a
tok(_s a -1 "---")
out a[0]
It would be nice to have a split function like #1 with the same functionality as PowerShell