I want to apply a search and replace a regex pattern that only works on a given range of rows and columns in a text file as follows:
AAABBBFFFFBBBAAABBB AAABBBFFFFBBBAAABBB GGGBBBFFFFBHHAAABBB
For example, I want to replace BBB with YYY in a linear range from 1 to 2 and from column 4 to 6, then get this output:
AAAYYYFFFFBBBAAABBB AAAYYYFFFFBBBAAABBB GGGBBBFFFFBHHAAABBB
Is there any way to do this with Vim?
vim regex
aleroot
source share