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
>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
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
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
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