1) The metacharacters
2) The greedy qualifiers
3) The non-greedy qualifiers
4) The ranges
[12345], [^"], [a-z], [-0-9], ...
5) The grouping and backreferences
6) The alternatives
Using "\|
" you can combine several expressions into one which matches any of its components. The first one matched will be used.
The thing to remember about VIM alternation that it is not greedy. It won't search for the longest possible match, it will use the first that matched. That means that the order of the items in the alternation is important!
7) The operator precedence
8) The examples
(1) There is a file which contains the following lines, we need do the following:
abc => abc=abc
cde => cde=cde
Solution:
:%s/\(.\+\)/\1=\1/
(2)