On Wed, 27 Sep 2000, Richard Proctor wrote:
> > Both \1 and $1 refer to what is matched by the first set of parens in a
> > regex.  AFAIK, the only difference between these two notation is that \1
> > is used within the regex itself and $1 is used outside of the regex.  Is
> > there any reason not to standardize these down to one notation (i.e.,
> > eliminate one or the other)?
> 
> I think this is fixable.  

        The way you phrase that makes it sound that other people perceive
this as a problem as well, which gives me all sorts of warm fuzzies. :>

>The only real need for this at the moment is to
> overcome limitations in the order of expansion of regexes.  RFCs 112, 166,
> 276... all depend on fixing this.  

        Ok, here's another question.  How the _HELL_ does everyone else on
this bloody list keep track of every detail in every frigging RFC?  Some
random comment comes up, and someone will go, "Oh, the third paragraph of
the second section in RFC 0x97A already mentioned this as a parenthetical
aside, despite the fact that its title and primary topic had no relation
to the issue."  I still have (mumble-mumble) RFCs that I haven't even had
time to *read*, let alone memorize every detail of!

        Grrrrrr....*grumble, grumble, moan, winge*

        Ok, back to rationality now.

>If the regex compiler gets in before the
> expansion of the variables to make these work, it could handle $1 in all cases
> \1 can be retained for compatibility.

        Do we *want* to maintain \1?  Why have two notations to do the
same thing when one is clearly superior?  (\1 can only go up to \9 while
the other could theoretically go to ${9999...}.)  Perl6 is breaking
backwards compatibility and eliminating all deprecated features...let's
get rid of \n as backreference notation.

                                        Dave

Reply via email to