Boost logo

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:26:27


Thanks for the info. I really was hoping to use Regex and if I can't figure
it out, I'll definately use Tokenizer for this purpose.

"Eric MALENFANT" <Eric.Malenfant_at_[hidden]> wrote in message
news:F660559FAA5FCD46B38F53152D092E28020983C6_at_ares.INTERSTARINC.COM...
Jeff Dunlap, le 13 novembre 2008 23:18:
> 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

escaped_list_separator in Boost.Tokenizer seems to do what you need.

Éric Malenfant
---------------------------------------------

--
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