RE: [NTS] Re: regular expression to find anything up to two spaces in a row ...
Not quite. Look ahead and look behind assertions are very useful, I agree but
\K and (?<=...) [the positive look behind assertion] are NOT EXACTLY the
same. The big difference (and what makes \K so much better), is that the
escape sequence \K allows variable length sub patterns whereas the positive/
negative look ahead/look behind assertions all require fixed length sub
At 06/21/2011 19:12, John wrote:
>[Off to look up (?= ) and see what it means.]
>I use it often. It is the inverse of \K - which doesn't capture anything
>before, but it evaluates it.
>(?=), when used in a regex, is exactly the same, meaning anything that
>follows is not captured,
> but is evaluated.