The syntax is as follows:
:s/Search/Replace/CommandFlag :s/Search-Word/Replace-Word/g :%s/Search-Word/Replace-Word/g :%s/Search-Word/Replace-Word/gcTo find each occurrence of eth0 in the current line only, and replace it with br0, enter (first press Esc key and type):
:s/eth0/br0/gTo find and replace all occurrences of eth1 with br1, enter:
:%s/eth1/br1/gTo find and replace all occurrences of eth1 with br1, but ask for confirmation first, enter:
:%s/eth1/br1/gcTo find and replace all occurrences of case insensitive eth1 with br1, enter:
:%s/eth1/br1/giThe above example will find eth1, ETH1, eTh1, ETh1 and so on and replace with br1. To find and replace all occurrences of eth1 with br1 for lines from 3 to 7, enter:
:3,7s/eth1/br1/g