Boost logo

Boost Users :

Subject: Re: [Boost-users] [tokenizer] boost::tokenizer doesn't handle '/' properly?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-03-23 18:46:59


> On 3/23/2010 11:28 AM, Naked Short Selling wrote:
>> Greetings,
>>
>> I'm trying to parse a csv file using boost tokenizer. But I see weird
>> result when there are cells like "IG9/10/7-10:USCEFLCORR0001",
>> tokenizer returns tokens like "IG9/,0/7-,0:USCEFLCORR000". I am
>> assuming it's because of slash '/'.
>>
>> Here's my code snippet:
>> "
>> typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
>> char delim = ',';
>> boost::char_separator<char> sep(&delim);

I suspect that &delim should be ",".


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