0

If I have

/*... code ...*/
lord
Lord
/*... code ...*/

I want a regex to consider the case of the first letter and based on that makes the change. Basically, I want the above lines to change to

/*... code ...*/
cord
Cord
/*... code ...*/

In Vim I have tried something, but I know it is not going to work

s/[l|L]ord/(/*what should i write here*/)rod/gc

PS: I know I can do it in tow steps but I thought it is possible to do it in just one step

hamaney
  • 454
  • 7
  • 16

0 Answers0