C++ - Remove or skip quote char in reading a file line by tokenizer

I have a csv file that has records like:


The file has lots of records, so I need a fast method to breakdown the line and push_back each of those parts into a vector. The main reason I choose tokenizer is that I heard a lot about its performance. I have a function:

void break(){
   //using namespace boost;
   string s = "This is a , test '' file";
   boost::tokenizer<> tok(s);
   vector<string> line;
   for(boost::tokenizer<>::iterator beg=tok.begin();beg!=tok.end();++beg){
   cout << line[3] << "  and  " << line[5] << endl;

By that I can get each part of the sentence and ignore everything that is not a letter. Does the tokenizer have the ability to read the record that I have and parse them by "*" delimiter and remove the quotes from the string? There won't be any kind of special character between quotes, I just need to remove the quote marks. I tried to read the tokenizer document, but nothing came out.


You need to assign another TokenizerFunc to your Tokenizer to parse the string differently, the default parses on space and punctuation


You can use regex_replace.

"break" is keyword. You shouldn't use it for function name.

Need Your Help

PostgreSQL query failure

sql postgresql postgresql-9.2 postgresql-9.3

I have a unique problem with PostgreSQL. After inserting data into a database I try and retrieve everything greater than a specific string. However, it does not return any data. So, I tried this on

array traversal algorithm to load the array with Rationals

java arrays object traversal

I have a java class already made up of methods and am in the process of creating a driver java class and just need some help figuring out how to load my traversal array with rationals. I have the