On Thu, 16 Sep 2004, Mark Clements wrote:
>For the record, \1 is a backreference ie it refers to a previously
>matched and captured part of the regexp.
>
>so
>
>(["'])([^\1]*)[\1]
>
>matches " or ', followed by any character other than these zero or more
>times, followed by whichever of " and ' was matched the first time.
No it doesn't. Character classes are created when the regex is compiled,
but \1 is not known until the regex is EXECUTED. Using \1 inside a
character class is that same as using \x01 or \001, it's the ASCII
character whose ordinal value is 1.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
Senior Dean, Fall 2004 % have long ago been overpaid?
RPI Corporation Secretary %
http://japhy.perlmonk.org/ % -- Meister Eckhart