good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Zero-width assertions fail with splitby merlyn (Sage) |
on Sep 19, 2005 at 05:00 UTC ( [id://493079]=note: print w/replies, xml ) | Need Help?? |
De Morgan is kicking your hiney.
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
In Section
Seekers of Perl Wisdom
|
|