in reply to Zero-width assertions fail with split
It's working as I would expect. You are asking to split on commas that have neither dashes before NOR dashes afterwards, as in "the delimiter is NOT dashes ahead AND a comma AND NOT dashes afterwards". That's the only time the split regex would match. Dashes on either side would prevent the comma from being considered. Your experimental results are borne out.
And simply splitting on commas would give you the list you want, so you'll have to show an example where simply splitting on commas doesn't do it.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Zero-width assertions fail with split
by Ovid (Cardinal) on Sep 19, 2005 at 05:06 UTC | |
by hv (Prior) on Sep 19, 2005 at 12:00 UTC | |
by gargle (Chaplain) on Sep 19, 2005 at 06:16 UTC |