thanks... but I am looking for the particular negation to be part of a much more complex overall regular expression... i.e., how can i do the negation within the expression itself, rather than relying on
!~?
What I am trying to do is match outermost <% ... %> "brackets" while also handling possible internal pairs of my own unique bracketing system:
$re = qr{\<\%(?:(?>[^(\<\%|\%\>)]+)|(??{$re}))\%\>};
I guess what I am looking for is a replacement to the [^(\<\%|\%\>)]+ part above (unless that is correct).