I have data and a similar problem to this question: Parsing pipe delimited string into columns?
However my data can contain sub strings with no data, or strings that are incomplete. Note that 5 values is the maximum. The solution in the question above fails unless the string has 5 values. See below:
KEY VALUE
---- -------------------
00 val1||||val5
01 val2|val2|val3|
02 val1|val2||val4