From the perlre man page:
If the "(*ACCEPT)" is inside of capturing groups then the groups are marked as ended at the point at which the "(*ACCEPT)" was encountered. For instance:
'AB' =~ /(A (A|B(*ACCEPT)|C) D)(E)/x;will match, and $1 will be "AB" and $2 will be "B" ...
However if the second capture group has a quantifier, the pattern never matches:
'AB' =~ /(A (A|B(*ACCEPT)|C)+ D)(E)/x or die "No match"; #dies
^
Why is this? Replacing the + with * or {0,99} makes no difference. Any quantifier on a capture group which encloses the (*ACCEPT) seems to prevent the *ACCEPT from working. Thanks in advance for any help.