is \1 vs $1 a necessary distinction?
[email protected] (Dave Storrs) Wed, 27 Sep 2000 08:15:53 -0700 (PDT)
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <Pine.BSF.4.10.10009270812300.88724-100000@megazone23.bigpanda.com> |
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)? Dave