I have two strings and i need to parse them as one with boost::regex
. To accomplish this i need to glue my strings in some boost::string_ref
like object, but no additional allocations are allowed.
In other words i need something like this.
const char s1[] = "abcd<ht";
const char s2[] = "ml>giuya";
boost::regex e("<[^>]*>");
//this is what i'm looking for
auto glued_string = make_glued_string(s1, sizeof(s1)-1,
s2, sizeof(s2)-1);
boost::regex_iterator<glue_string::iterator>
it(glued_string.begin(), glued_string.end(), e,
boost::match_default | boost::match_partial);
So the question is are there any suitable libraries or i have to implement this by myself? Thanks.