Re: RFC 331 (v1) Consolidate the $1 and C<\1> notations
[email protected] (Bart Lateur) Sat, 30 Sep 2000 22:47:24 +0200
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Organization | MediaMind |
| Message-ID | <[email protected]> |
On 28 Sep 2000 20:57:39 -0000, Perl6 RFC Librarian 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. I wrote this before, but apparently you didn't hear it. Let me repeat: $foo on the LHS allows metacharacter matching, for example "a.*b" can match "a foo b". But \1 only allows literal strings. If $1 captured "a.*b", then \1 will only match the literal string "a.*b", as if the regex contained "a\.\*b". I don't see how you can possibly consider this a "tiny difference". -- Bart.