Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g

2016-03-21 Thread Thanh Hong Dai
ct: RE: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g >Does it mean that (*SKIP:label) looks for the (*MARK:label) in the regex >execution stack to figure out where to bump along to? Exactly. It searches the last MARK in the regex stack which name matches

Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g

2016-03-21 Thread Zoltán Herczeg
>Does it mean that (*SKIP:label) looks for the (*MARK:label) in the regex >execution stack to figure out where to bump along to? Exactly. It searches the last MARK in the regex stack which name matches and restart the match from there. E.g.: when /x(*:a)x(*:a)(*SKIP:a)(*FAIL)|./ matches to

Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g

2016-03-21 Thread Thanh Hong Dai
ds, Thanh Hong. -Original Message- From: Zoltán Herczeg [mailto:hzmes...@freemail.hu] Sent: Friday, 18 March, 2016 8:11 PM To: Thanh Hong Dai <hdth...@tma.com.vn> Cc: pcre-dev@exim.org Subject: Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g Hi Thanh

[pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g

2016-03-20 Thread Thanh Hong Dai
Hi, When testing the behavior of (*SKIP) to understand its underlying implementation, I constructed the following regex to verify my understanding: /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g Test input: aaabbbaa With the assumption that (*SKIP) fails the attempt

Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g

2016-03-19 Thread Zoltán Herczeg
Hi Thanh, I think these questions are better suited to https://www.reddit.com/r/regex anyway, I think the /g causes the regex to match all characters. Without that it probably just matches only one character, as you can see in regex101. The first half of your second assumption is correct, the