Hacker News new | ask | show | jobs
by greenshackle2 834 days ago
Can you parse this 2-row CSV:

SomeCommas,MoreCommas,OnlyOneComma,ALotOfCommas

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

1 comments

Pathological cases are never difficult to find for any app.
Wrong. Consider the standard backslash escape: represent literal comma as "\,", and literal backslash as "\\". Backslashes are otherwise forbidden.

It will be difficult to find pathological cases for this grammar, because they don't exist.

Well okay, but there's an outer circle of Hell where people write code to manipulate Windows filepaths.