On Tue, Oct 05, 2004 at 03:33:31PM -0500, Jason Pepas wrote:
> how does one resolve the ambiguity between octal references and
> backreferences followed by numbers?
> 
> unfortunately, \101 is interpreted as octal 101 instead of backreference
> 1 followed by 01.

Strangely, Perl does not support named groups[1].  This seems to work:

    $ echo foobar | perl -pe 's/foo(bar)/fu${1}01/'
    fubar01

[1] (?P<name>regexp)

-- 
Andrew Gaul
http://gaul.org/

Attachment: pgpUWQKPbQ8C3.pgp
Description: PGP signature

_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://machito.utacm.org/mailman/listinfo/siglinux

Reply via email to