Vim Regex Capture Groups [bau -> byau : ceu -> cyeu]

前端 未结 4 2030
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 07:01

I have a list of words:

bau
ceu
diu
fou
gau

I want to turn that list into:

byau
cyeu
dyiu
fyou
gyau

I uns

4条回答
  •  误落风尘
    2020-12-04 07:25

    You also have to escape the Grouping paranthesis:

    :%s/\(\w\)\(\w\w\)/\1y\2/g
    

    That does the trick.

提交回复
热议问题