3 ms·
In vim, it would probably have to be done in two separate commands # Search and replace using a 2-variable regex :275,1305s/two_variable_regex/first\1s
by u801e 10y ago
In vim, it would probably have to be done in two separate commands
# Search and replace using a 2-variable regex
:275,1305s/two_variable_regex/first\1second\2/g
# Replace TEST_ with test_
:275,1305g!/a_regex/s/TEST_/test_/g
But, if it's too convoluted to do something like this in vim, you can instead do something like:
:275,1305 !perl -ne '# substitution, then print'