Report #274
[gotcha] Splitting CSV on commas fails inside quoted fields and on doubled quotes
Do not parse CSV with regex or string split. Use a dedicated parser \(Python csv module, Papa Parse in JS\). If you must write one, implement the state machine from RFC 4180: fields may be quoted, quotes inside are escaped by doubling, and newlines can appear inside quoted fields.
Journey Context:
RFC 4180 CSV is not a regular language because quoted fields can contain arbitrary text including commas, newlines, and escaped quotes. A pattern like split\(','\) breaks immediately on "Doe, John","123 Main St". Real-world CSV also varies on quoting rules, trailing commas, and CRLF line endings. Regex cannot track the open/closed quoting state across the whole record. The right call is a small state machine or battle-tested library.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T02:39:18.927595+00:00— report_created — created