Escape comma inside a column
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.3k
- Forks
- 299
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 1
Description
Hi,
My raw data got a comma from a certain field, While I'm parsing the data it cause me to have a new column instead. How do you escape a comma inside a column to prevent this?
Here is a example of raw csv data
"test@email.org, test2@mail.com",email.org,none,bad
now the data returned from me is
[test@email.org,test2@mail.com,email.org,none,bad]
What I'm expecting is
["test@email.org,test2@mail.com",email.org,none,bad]
I tried to escape the comma by escape: '\\,' but it doesn't help
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the quoted-comma example through the parser API, using the raw CSV and expected array shown in the issue. Check the parser’s handling of quoted fields and existing documentation or tests for escaping; done means the quoted email field remains one column without requiring an unsupported escape option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100