Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-03-30 12:27:18

(Sorry for starting a new thread instead of replying. GMane appears to
be down at the moment.)

> 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);

Please see the section "Grouping and Captures" in the documentation

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at