I am able to pattern match a regex in vi
, but when I add the replacement string, vi
thinks that is part of the regex match. This occurs despite use of various different delimiters. Is there some way to avoid this? As an example, the following command matches and deletes the desired string (\a{b}[c]
):
s:\\a{b}[c\]
However, If I add a replace string,
s:\\a{b}[c\]:abc
I receive the error
E486: Pattern not found: \\a{b}[c\]:abc
vi
is therefore not recognizing the delimiter that separates the query regex from the replacement string. This happens with a variety of different separators/delimiters. How can I ensure that vi
correctly distinguishes between regex pattern and replacement string?