[Clip] Re: Removing unwanted data.
- --- In email@example.com, Axel Berger <Axel-Berger@...> wrote:
>With the "A" option it replaces all, without it, it replaces once. I
> Sheri wrote:
> > The RSAW at
> > the end means, regex replace all silently in the whole file.
> > ^!Replace "(?<=\d)(?>\x20\d[^\r\n]+)" >> "" RSAW
> I found the manual somewhat unclear there. Could I
> write RSA5W to make it start at the beginning, replace
> exactly five instances and stop?
> Danke Axel
don't see anyplace in the documentation suggesting otherwise? If you
really needed to replace a fixed number of times, you could run
replace a fixed number of times in a clip/loop. You would not want to
use the "W" option because that would cause it to always search from
the top, instead of from the end of the previous replacement.
There is a number option available in regex find and replace commands,
but that is to identify a target subpattern (if any) and has nothing
to do with the number of instances to replace. The optional target
subpattern specifies a subpattern within the search pattern to be
targetted for ^!Find or ^!Replace. If none is specified, it defaults
to zero, which is the whole pattern (like $0).