in reply to Re^2: Splitting a line on just commas
in thread Splitting a line on just commas
A more general solution can be found
The phrase "more general" is similar to "a bit pregnant".
There is little point in catering for one possibility not in evidence and not another. You should either cater for what is; or for every possibility.
As noted on wikipedia, there is no single consistent standard for what constitute CSV or TSV etc. The module we both mentioned therefore jumps through extraordinary hoops to try and cater for every possible variation--and inevitably fails.
But, individual sources of CSV output are usually self-consistent.
Just as we don't take a universal phrase book covering every known language--were such available--with us when travelling to a particular country, it rarely makes sense to try and cater for non-evident possibilities unless you are going to cater for them all. You're either doing more work than necessary; or not enough.
|
|---|