Re: is \1 vs $1 a necessary distinction?
[email protected] (Uri Guttman) Wed, 27 Sep 2000 12:29:28 -0400
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <[email protected].> |
>>>>> "DS" == Dave Storrs <[email protected]> writes: DS> Both \1 and $1 refer to what is matched by the first set of parens DS> in a regex. AFAIK, the only difference between these two notation DS> is that \1 is used within the regex itself and $1 is used outside DS> of the regex. Is there any reason not to standardize these down DS> to one notation (i.e., eliminate one or the other)? because $1 having be set previously will be interpolated INTO the new regex. so you have to have another notation to refer to grabbed stuff from the current regex. uri -- Uri Guttman --------- [email protected] ---------- http://www.sysarch.com SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books The Best Search Engine on the Net ---------- http://www.northernlight.com