22605Re: [Clip] Re: FIND in NTL V7pr3 still acting odd
- Apr 16, 2012Hi John,
> I found an interesting thing while testing this: When finding withThis works as designed. When a successful match has a length of zero
> just \s* on the pattern below, it stops at each character position
> until it gets to a whitespace character, then finds that. Just keep
> clicking Find until it finally finds a whitespace. I tried adding a
> space after the letters, and found that it would find both the space
> and the CR, but only after it had stopped at each character position
> first. This seems wrong, such as \s? might produce. So \s* does not
> find a space or a CR until it has stepped through character positions
> to the point of the whitespace.
characters, NoteTab then shifts position by one character on repeating
the search. This is necessary to avoid getting stuck in an infinite loop
when running a Replace All operation.
Using \s+ avoids this issue because a successful match must be at least
> In the past, I have noticed some erratic behavior with \s* in my clipI think in most cases it is best to avoid running RE searches that can
> library, and couldn't understand what was causing it. I changed my
> clips to not use \s in some of those cases, and now don't use it
> much. At least this little exercise demonstrates that there is some
> unexpected behavior, even if it is as intended.
produce 0-character matches.
- << Previous post in topic Next post in topic >>