How to specify the delimiter for String Split

1
I'm trying to split a string with a String Split from Community Commons. I have specified "|" as the delimiter, but the result is different from what I expected. Can anyone please tell me how to set it? (Escape using "\" has been tried.) ・ Assumption aaaaa | bbbbb → Divided into aaaaa and bbbbb ·Execution result aaaaa | bbbbb → Divide one character at a time (a, a, a, a, a, |, b, b, b, b, b)
asked
2 answers
5

The split is actually a regular expression, so you want to use the following for your Split parameter.

' \| '

 

answered
1

Using Robert’s solution works for me. Not escaping the pipe character makes it an ‘or’ in the split, which (with nothing before or after it) will split every single character.

Note that while the Variables tab states the Delimiter I defined is ‘\\|’, it’s value is set as ‘\|’

answered