|
Boost Users : |
Subject: Re: [Boost-users] Regex - Reading CSV files like MS Excel does
From: Jeff Dunlap (jeff_j_dunlap_at_[hidden])
Date: 2008-11-14 14:34:10
I've been looking at those googled expressions and they don't seem to handle
the CSV file the way they should.
I'll continue experimenting or use Boost.Tokenizer for this purpose as
suggested by Eric Malenfant.
Thanks
"Jeff Flinn" <TriumphSprint2000_at_[hidden]> wrote in message
news:gfk7o3$3mc$1_at_ger.gmane.org...
> Jeff Dunlap wrote:
>> The expression regex e(",") handles files in a clean format such as:
>>
>> field 1,field 2,field 3
>>
>>
>>
>> I would like to read some CSV files where there may be fields that
>> contain a comma (enclosed in ""):
>>
>> 1999,Smith, Mike, "Smith, Mike", 55
>> 1999,Doe, Jane, "Doe, Jane", 45
>>
>>
>>
>> And if possible, I would like to handle commas and quotes within the
>> field:
>>
>> 1999,Doe, Jane, "Doe, Jane "Happy Gurl"", 45
>
> googling regex csv yields several hits the first of which is:
>
> http://geekswithblogs.net/mwatson/archive/2004/09/04/10658.aspx
>
> Jeff
-- ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net