in reply to Evaluating code in a regex at runtime: (??{...})
In particular, the last capture is index number 3./(....)...(...)...(??{foo()})....(...)/ ^ ^ ^ 1 2 3
Each time the pattern is run, foo() might return a string or qr// which has a different number of captures; and which might recursively also include /(??{...})/ and further nested captures. This would make it nearly impossible to guess how to refer to the final capture in the outer pattern, unless we just always call it $3.
Dave.
|
|---|