Comma delimited ASCII
Timothy Grant
tjg at exceptionalminds.com
Fri Aug 25 16:45:23 EDT 2000
Hi all,
I'm working on a project where I get a stream of comma delimited ASCII that
needs to be parsed. This seems like a perfect use of regexes somewhere, but
I am stumped as how to best process the data. The problem is that there are
often , characters within the delimiting quotation marks. I know that this
must be a regular occurrence, but I don't find anthing in the archives for a
practical approach to parsing the data.
"This","is","a","sample","data, set","there", "are",
"also",1,2,3,4,"numbers"
So, how does one tear this apart? if it weren't for the comma between 'data'
and 'set', I'd split on the , character. Splitting on "," or ," or ", all
work except they don't handle the numbers.
Suggestions would be greatly appreciated!
--
Stand Fast,
tjg.
Timothy Grant tjg at exceptionalminds.com
Chief Technology Officer www.exceptionalminds.com
Red Hat Certified Engineer (503) 246-3630
Avalon Technology Group, Inc. fax (503) 246-3124
>>>>>>>>>>>>Linux...Because crashing isn't normal<<<<<<<<<<<<<
More information about the Python-list
mailing list