Skip to content

Breaks when delimiter showing up inside row values #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thunderchao opened this issue Feb 8, 2022 · 0 comments
Open

Breaks when delimiter showing up inside row values #2

thunderchao opened this issue Feb 8, 2022 · 0 comments

Comments

@thunderchao
Copy link

thunderchao commented Feb 8, 2022

My source CSV has values that contain commas. Every value has double quotes around it. How would I change this code to skip the commas that are inside of double quotes?

Code example:
ID,Full Name,Address
"85DD-019F","Alice","123 Park Ave, Topeka, KS, 66618"

I've tried setting the delimiter to '/,(?=(?:(?:[^"]*"){2})*[^"]*$)/' (from this link) but then the array is the entirety of the row, then a bunch of undefined to fill out the rest of the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant