Re: [pcre-dev] \K in lookahead assertion gives unpredictable…

Top Page
Delete this message
Author: ND
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] \K in lookahead assertion gives unpredictable result
<ph10@???> писал(а) в своём письме Fri, 27 Dec 2013 16:28:20
+0400:

> On Thu, 26 Dec 2013, Zoltán Herczeg wrote:
>
>> I didn't know it is accidental. I thought printing an empty string is
>> less useful for a testing tool. Perhaps printing the offsets
>> themselves would be the best.
>
> I have committed a patch that does this:
>
> /(?=ab\K)/+
>     abcd
> Start of matched string is beyond its end - displaying from end to start.
>  0: ab
>  0+ abcd

>


Sorry. But I don't understand why result is 'ab'. I think result must be
''.