[pcre-dev] (*THEN) in last alternative

Top Page
Delete this message
Author: ND
Date:  
To: Pcre-dev
Subject: [pcre-dev] (*THEN) in last alternative
Good day!

Here is two pcretest.exe listings:


PCRE version 8.11 2010-12-10
/\A.*?(?:a|b(*THEN)c)/
ba
No match


PCRE version 8.11 2010-12-10
/\A.*?(?:a|b(*THEN)c|d)/
ba
0: ba

Why first expression is not match? And why adding a third alternative
caused expression to match?
Is it a planned behaviour?

As i can see in documentation about (*THEN), "it cancels pending
backtracking, but only within the current alternation". Why it cancels a
backtracking to ".*?" ?

Thanx.