Boost logo

Boost Users :

From: Markus Svilans (msvilans_at_[hidden])
Date: 2008-04-14 14:00:30


Hi Dmitry,

Check out regex_token_iterator in the Boost Regex documentation. It will
let you use any kind of delimiter you want, including regular expressions.

Also, split() can split the string on multiple delimiters, so it would
work on one or more tab characters. However, if you want it to split
only on double tabs, and not one or three or more, then it wouldn't be
suitable. For that, regex_token_iterator would be best.

Regards,
Markus.

Dmitry Teslenko wrote:
> Hello!
> For example I want to split string with single char '\t' delimeter.
> According to docs this can be done this way:
> std::vector<std::string> options;
> std::string sep;
> sep += '\t';
> boost::split(options, line, boost::is_any_of(sep));
>
> But if I want to use double tab as a delimiter? Is there an
> alternative to boost::is_any_of like "boost::just_what_i_say"
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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