
24 Sep
2008
24 Sep
'08
11:38 p.m.
Eric Niebler wrote:
Raindog wrote:
mark_tag file_(0), vbp_(1), sig_(2);
The problem is here^^^
sregex files_re = "xcopy" >> -*_ >> "/Y" >> _n; sregex vbp_re = "@rem " >> -*_ >> " files: " >> repeat<1, 4>(_d)
_ln; sregex sig_re = "@rem {" >> -*_>> "}, " >> *~_ln;
Sub-match 0 is "special". It refers to the whole match, not to an individual sub-match. Change that line to:
mark_tag file_(1), vbp_(2), sig_(3);
... and that should fix your problem.
Ok, that works, thanks! Secondly, I'm using the nested_results() function but am puzzled as to how to distinguish between which regex was responsible for creating the nested result. Is there a way to get only the nested results that files_re matched? Thanks!