I have a string like mystr = 'value1~|~value2~|~ ... valuen"
. I need it as one column separated on rows like this:
value1
value2
...
valuen
I'm trying this
select regexp_substr(mystr, '[^(~\|~)]', 1 , lvl) from dual, (select level as lvl from dual connect by level <= 5);
The problem is that ~|~
is not treated as a group, if I add ~ to anywhere in the string it gets separated; also () are treated as separators.
Any help is highly appreciated! Thanks! ~|~
This will parse the delimited list and the format of the regex will handle NULL list elements should they occur as shown in the example.