Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-09-15 12:10:18


Answering an old question that got lost in the fray ...

Scott Woods wrote:
>
> "What[ 0 ]" is the odd one out; it does not have an implicit mapping to a
> manifest
> sub-expression. To RE-philes (I think my first exposure to $0 was in "vi"?)
> it's de
> rigueur. To those C++ developers that were born more recently but are
> familiar
> with STL, it's a wrinkle. Does processing of "what" always involve
> "++what.begin()" only
> because "what.complete()" fails to compete with tradition.

I understand what you're saying, but I don't agree that it's that for
solely for legacy reasons. In practice, the only reason why you might
iterator over all sub-matches is to print them out. Otherwise, the
sub-matches are accessed randomly, because (for example) the 1st
sub-match is a date and the 3rd sub-match is an email address, and I'm
not interested in the 2nd. See?

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk