(with replace we mean here a single replace, even if the last Replace
operation ended with a global substitution).
This command is mainly useful for researching a given number of times, or replacing something a given number of times. The standard technique for accomplishing this is:
Find
(or FindRegExp
) the string you are interested in;
ReplaceOnce
with
the replacement string you are interested in;
RepeatLast n-1
command, where n is the
number of occurrences you wanted to skip over, or replace.
The important thing about this sequence of actions is that it will
work this way even in a macro. The Replace
command cannot be used
in a macro unless you really want to interact with ne
during the
macro execution. This is the only reason why the commands ReplaceAll
and ReplaceOnce
are provided.