I have the next text
aaa|bbbb|cccc|dddd\|eeee|ffff
and i want to split by | and excluding when | is preceded by \ and obtain
aaa
bbbb
cccc
dddd\|eeee
ffff
Thanks.
ps : i tried using some regexp generator (for example http://txt2re.com/ ) but frankly regexp is anything but friendly.
update: finally i give up. Regexp is not fast (i did a benchmark), neither is clear (in comparison with a function that everybody can follow), then i skip it and now i am using real code.
Tried to add this as a comment to eyelidlessness’s answer, but don’t know how to format it there…
Anyhow, eyelidlessness answer looks correct to me:
which prints: