For example, when you type this:
:%s/1\. Start/2. Next, start with $100/
note that the replacement string
treats the characters . and $
literally, without your
having to escape them.
By the same token, let's say you enter:
:%s/[ABC]/[abc]/g
If you're hoping to replace A with
a, B with b,
and C with c,
you'll be surprised. Since brackets behave like
ordinary characters in a replacement string, this command
will change every occurrence of A,
B, or C to the
five-character string [abc].
To solve problems like this,
you need a way to specify variable
replacement strings. Fortunately, there are additional metacharacters
that have special meaning in a replacement string.