I want to split this expression
A+ + B
by the "+" in between so that I have A+ and B at the end
Note that the + after A is apart of the first token and I don't want to split it
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <boost/algorithm/string/regex.hpp>
#include <vector>
using namespace std;
int main()
{
string expression="A+ + B";
vector <string> resultArray;
boost::algorithm::split_regex( resultArray, expression, boost::regex( " + " ));
for (int i=0; i<resultArray.size();i++){
cout <<resultArray[i]<< endl ;
}
return 0;
}