Thanks. For the record, I had to make one small correction. { results.push_back(copy_rangestd::string(*it)); } because *it was just a range. -- Seth N. Thore B.Karlsen wrote:
On Mon, 24 Jul 2006 14:53:51 -0500, Seth Nielson
wrote: No, that won't suit my needs. Did you read my message? I said I need MARK to be a substring, not a single character.
Use a split iterator:
string str = "1ab2ab3"; vector<string> results;
typedef boost::split_iteratorstd::string::iterator string_split_iterator;
for (string_split_iterator it = make_split_iterator(str, first_finder("ab")); it != string_split_iterator(); ++it) { results.push_back(*it); }
As for which one is preferable, I like the string algo library much better than I like the tokenizer library. It's very, very good.