In find replace operations with regex on, $1 in the Replace field refers to the first capture group. In some programming languages/text editors, they will make $0 or the first index (result[0]) of the array returns the entire capture.
Motivation
This is useful when you want to paste the whole thing. Like consider if you have a list of phone numbers, and you use the regex "((\d{3}))(\d{3})-(\d{4})" to try to make it like "Number: ." To do this you kind of have to reconstruct it like "Number: ($1)$2-$3". Under this proposal you just do "Number: $0" which would be easier. This is a trivial example, I used it since I just used it, but you can imagine more complicated ones.
Describe alternatives you've considered
Reconstructing the match, but in some cases, this is inconvenient to do.
Summary
In find replace operations with regex on, $1 in the Replace field refers to the first capture group. In some programming languages/text editors, they will make $0 or the first index (result[0]) of the array returns the entire capture.
Motivation
This is useful when you want to paste the whole thing. Like consider if you have a list of phone numbers, and you use the regex "((\d{3}))(\d{3})-(\d{4})" to try to make it like "Number:." To do this you kind of have to reconstruct it like "Number: ($1)$2-$3". Under this proposal you just do "Number: $0" which would be easier. This is a trivial example, I used it since I just used it, but you can imagine more complicated ones.
Describe alternatives you've considered
Reconstructing the match, but in some cases, this is inconvenient to do.
Additional context
Current:
Potential: