"Assertion" is the wrong word here because unless you do gymnastics the code block has no affect on whether the expression succeeds or fails. On the rare occasion that I want to use perl code in an assertion (and this never happens for "real" code) you have to use the eval block in a conditional and then use zero-width assertions to simulate a true-false.
/(? # Use the conditional construct (?{ perl code goes here}) # Perl code that will assert something (?=) # empty positive assertion. | (?!) # empty negative assertion )/x
In reply to Re: Re^6: Replace zero-width grouping?
by diotalevi
in thread Replace zero-width grouping?
by tinypig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |