From: Jorge Lodos (lodos_at_[hidden])
Date: 2007-03-30 13:24:53
Eric Niebler wrote:
> > If you use
> > sregex time = (_d) >> ':' >> (_d >> _d); instead of sregex time =
> > sregex::compile( "(\\d):(\\d\\d)" );
> There's your mistake. In static regexes, ()'s group but they
> don't capture. The equivalent of the dynamic regex is:
> sregex time = (s1= _d) >> ':' >> (s2= _d >> _d);
It works as expected now.
It was not obvious to me that you needed to capture in order for
regex_token_iterator to work, allthough it does now that you clarified.
There is no way to overload left or right parentheses :-)
Perhaps a note in the docs or another example will help other people not to
make the same mistake.
Thanks again for your answer and xpressive!
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk