>>>>> "R" == Robert Feldt <feldt / ce.chalmers.se> writes:

R>    /%q(.)(?while count(\1) != count(balancing(\1)))\1/

 You are on the road of a P language with this, and there is some madness
in it :-)))

 See (?{}), (??{}), etc

 and there are *VERY GOOD* reasons for this (from perlre)

 ------------------------------------------------------------
 For reasons of security, this construct is forbidden if the regular
 expression involves run-time interpolation of variables, unless the
 perilous C<use re 'eval'> pragma has been used (see L<re>), or the
 variables contain results of C<qr//> operator (see
 L<perlop/"qr/STRING/imosx">).  
 ------------------------------------------------------------
 


Guy Decoux