Monday, August 30, 2010

Simple Search & Replace in VI

In vi, this will replace any (uppercase or lowercase variation of the word "cat", or CAT, or cAt, with the word "dog" globally in the entire file.


%s/[Cc][Aa][Tt]/dog/g

No comments:

Post a Comment