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
In reply to Re: Capture Groups
by jo37
in thread Capture Groups
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |