I'm sorting through a CSV file splitting (using .match()
) on commas outside of quotes, and what I have so far is working:
/"[^"]*"|[^,]+/g
The only problem is that there are several areas where the string might be something like:
...,xxx,,xxx,...
and what I want to have happen is that I get a an array from that of:
[...,xxx, ,xxx,...]
but instead I get
[...,xxx,xxx,...]
changing it to
/"[^"]*"|[^,]*/g
doesn't work out so well. Any thoughts?