
12 Feb
2009
12 Feb
'09
4:02 p.m.
"Eric Niebler" <eric@boost-consulting.com> wrote in message news:499444D3.2030806@boost-consulting.com...
You can nest regular expressions to get the same behavior.
sregex re0 = as_xpr('$'); sregex re1 = re0 >> +_d; sregex re2 = re1 >> '.' >> _d >> _d;
You lose most of the benefits of static regular expressions when you do this, though.
You can also use BOOST_PROTO_AUTO if you have a sub-expression that's used a lot. You have to include header <boost/proto/proto_typeof.hpp>. For example: //sregex re = '$' >> +_d >> '.' >> _d >> _d; BOOST_PROTO_AUTO( re2, '.' >> _d >> _d); sregex re = '$' >> +_d >> re2; HTH, Dave Jenkins