Ouch! Misusing split, which you attempt to fix by filtering out empty strings, which leads to warnings and the removal of empty fields.
Thing being separated vvvvvvv /(?:\,|(\".*?\"))/ ^^ Separator
How are those two things on equal footing?
In reply to Re^2: Splitting a line on just commas
by ikegami
in thread Splitting a line on just commas
by gibsonca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |