Report #1863
[gotcha] Parsing CSV by splitting on commas or with simple regex
Use a real CSV parser \(csv module in Python, papaparse in JavaScript\). If you must write one, implement the RFC 4180 state machine that handles quoted fields, escaped quotes \(""\), and embedded newlines.
Journey Context:
CSV looks trivial: split on commas. But quoted fields can contain commas and newlines such as "Foo, Inc",123,"Line1\\nLine2", and escaped quotes double up. Simple regexes break on all three cases. RFC 4180 defines CSV precisely, and the only robust approach is a small state machine or standard-library parser. Regex is the wrong tool because CSV is not regular once quotes can contain commas.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T08:51:47.827103+00:00— report_created — created