Use dark magic:
$array = preg_split('~\\\\.(*SKIP)(*FAIL)|\|~s', $string);
\\\\.
matches a backslash followed by a character, (*SKIP)(*FAIL)
skips it and \|
matches your delimiter.
Use dark magic:
$array = preg_split('~\\\\.(*SKIP)(*FAIL)|\|~s', $string);
\\\\.
matches a backslash followed by a character, (*SKIP)(*FAIL)
skips it and \|
matches your delimiter.