C++相談室 part88
■ このスレッドは過去ログ倉庫に格納されています
0358デフォルトの名無しさん
2011/03/21(月) 23:47:35.32#include <iostream>
#include <boost/xpressive/xpressive.hpp>
int main()
{
using boost::xpressive::digit;
using boost::xpressive::alpha;
std::string input("ab100cd33e");
boost::xpressive::sregex token = +digit | alpha;
boost::xpressive::sregex_token_iterator begin(input.begin(), input.end(), token);
boost::xpressive::sregex_token_iterator end;
std::vector<std::string> array(begin, end);
std::ostream_iterator<std::string> output(std::cout, "\n");
std::copy(array.begin(), array.end(), output);
}
こんなんでどうよ
■ このスレッドは過去ログ倉庫に格納されています