in reply to Re: Capture Groups
in thread Capture Groups

But you used \1 in the replacement part of a substitution

Oh!
So it's a conceptual problem...I was thinking of the whole of the substitution as being part of the regex...

Replies are listed 'Best First'.
Re^3: Capture Groups
by ikegami (Patriarch) on Nov 15, 2023 at 03:51 UTC

    It's part of the substitution operator, but the regular expression pattern passed to that operator is (Mr(s)?) a.