Hi, I am trying to parse values that are separated by double pipe '||' delimiter. However, I do not like to parse if there is just one pipe '|' delimiter. For example:
Column A Column B
1 123 || 456 || abc
2 123 | abc || 456
Expected output-
Column A Column B
1 123
1 456
1 abc
2 123 | abc
2 456
Can someone help me out here?
Solved! Go to Solution.
Here is how you can do it. Since text to column considers delimiter mentioned as separate delimiter and not together we need to replace " || " to a single character i am replacing it to "$" and then split to rows on "$"
Workflow:
Hope this helps 🙂
Hey @sunilmandava
I think the solutions offered by @apathetichell and @atcodedog05 are probably the way to go, but if you did want a RegEx solution then this works:
Tokenise to rows on this
(.+?)(?:\|{2}|$)
capturing everything before either 2 '|' or the end of a line (non-greedy)
@OllieClarke Neat!! i couldnt warp my head around on how can i make it work using regex. Now i know 🙂 and using {2} was one of the thing i needed but think about 😅