I want to separate this string using _ as the separators
{[Data1]_[Data2]_[Data3]}_{[Val1]_[Val2]}_{[ID1]_[ID2]_[ID3]} 
where underscore should not be considered inside the { } brackets.
so when we separate the strings we should have three new data items
 {[Data1]_[Data2]_[Data3]}
 {[Val1]_[Val2]}
 {[ID1]_[ID2]_[ID3]}
currently I was separating using boost
        std::vector<std::string> commandSplitSemiColon;
        boost::split(commandSplitSemiColon, stdstrCommand, boost::is_any_of("_"), 
        boost::token_compress_on);
but how can we ignore the underscore inside the { } brackets and only consider underscore which are not inside the brackets.