If I'm using a range in a regex, how can I replace with the character that was matched? For example, lets say I want to find all occurrences of
b, and replace them with
bb. Can I do this in a single regex? For example, something like this:
\1 means the first matching character? Can I extend this to several characters? For example converting
snake_case. Can I do something like this:
\1 is the first matching character and
\2 is the second matching character?