in reply to Regex backreferences
The replacement argument of the substitution operator is not a regular expression. You shouldn't use \1 in it since \1 means "match what the first set of captures captured".
For example, you'd use something like the following to put brackets around repeated characters:
s/((.)\2+)/[$1]/g
Update: Added example.
|
|---|