Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-09-19 04:56:51

> I wasn't considering back-references. Does the list have to be tied to
> back-references at this level?


IMO it would be extremely confusing to refer to the same element in code as
the zeroth element, and in the expression as \1.

There is a very long history behind using 1 as the first index for the first
sub-expression and 0 as the index for the whole match. Every programming
language with native regex support does it that way, so does every regex lib
I've ever seen (and Eric and I have seen - and written - a few between us).

Sorry, but changing this is really bad idea.


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