On Mar 28, Bryan R Harris said:

>- Why is the \1, \2, etc. syntax obsolete?  The one thing I love about
>regular expressions is that I can use them within text editors (nedit,
>textpad, bbedit), but none of these support the $1 notation in the replace
>string.  Why aren't re's consistent between perl and text editors?

\1 and \2 are to be used on the LEFT-HAND side of a regex; on the
RIGHT-HAND side, you should use $1 and $2 to remove any ambiguity, because
\1 can ALSO mean chr(1).

>- What does the "qr" tag do?

qr// makes a Regexp object that is a compiled regular expression.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to