in reply to Capture Groups
I have always been under the impression (or perhaps illusion) that \1 should be used within the regular expression and $1 outside of it.
That is correct. But you used \1 in the replacement part of a substitution, which is certainly outside the regex.
Greetings,
-jo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capture Groups
by Bod (Parson) on Nov 14, 2023 at 23:35 UTC | |
by ikegami (Patriarch) on Nov 15, 2023 at 03:51 UTC |