Re: RFC 331 (v1) Consolidate the $1 and C<\1> notations
[email protected] (Dave Storrs) Fri, 29 Sep 2000 13:04:37 -0700 (PDT)
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <Pine.BSF.4.10.10009291303220.99948-100000@megazone23.bigpanda.com> |
On Fri, 29 Sep 2000, Hildo Biersma wrote: > > Currently, C<\1> and $1 have only slightly different meanings within a > > regex. Let's consolidate them together, eliminate the differences, and > > settle on $1 as the standard. > > Sigh. That would remove functionality from the language. > > The reason why you need \1 in a regular expression is that $1, $2, ... > are interpolated from the previous regular expression. This allows me > to do a pattern match that captures variables, then use the results of > that to create a second regular expression. (Remember: A regexp > interpolates first, then compiles the pattern). Umm...with all due respect, did you read the RFC? Because what I proposed does not eliminate any functionality. Dave