Boost logo

Boost Users :

Subject: [Boost-users] [tokenizer] boost::tokenizer doesn't handle '/' properly?
From: Naked Short Selling (cashox_at_[hidden])
Date: 2010-03-23 11:28:29


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);
...
tokenizer tokens(str, sep);
tokenizer::iterator iter = tokens.begin();
tokenizer::iterator end = tokens.end();
"

Please advise.

Thanks!



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