You want "not both preceded and followed by TOKEN", which is equivalent to "either not preceded by TOKEN, or not followed by TOKEN", and that we can do:
my $split = qr/ (?<!$token) , | , (?!$token) /x;
Hugo
In reply to Re^3: Zero-width assertions fail with split
by hv
in thread Zero-width assertions fail with split
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |