Boost logo

Boost Users :

Subject: [Boost-users] [xpressive] accessing nested results from a submatch
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-08-15 20:27:57


Hi,

Is there a way to access nested results associated with a submatch?

For example:

sregex A = some_xpr;
sregex B = (s1 = A) >> other_xpr >> (s2 = A);
smatch m;
regex_match(str, m, B);

I know I can get a list of all the nested matches inside m, and I
can filter it down by regex id to matches for A, but is there a way
to get, say, "the nested matches for A that occurred inside the
sub-match s2" without necessarily knowing what is the position of
that in the list of all nested matches for A?

Thanks,
Nate
                                               


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