22 May
2011
22 May
'11
4:27 p.m.
Hello, I have some texts and I would like to remove words. Each word for removing is in a std::vectorstd::string and I use a std::string for separating the words on the text. My first idea is to use the boost:split for splitting words of the text, in the result vector I remove the words, which should be removed, and recreate the text from the vector by concatination the elements. But another idea is to create a regexpr with the removing word and the separators and use regex_replace for removing. Which idea is the better one or is there another way to removing word of a text? Thanks PHil