On Thu, 14 Jun 2001, ts wrote: > >>>>> "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 :-))) > Thanks for the pointer. > 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">). > ------------------------------------------------------------ > I'm not sure I fully understand what you mean. Is is "mad" only because of security concerns or is it mad in itself (as in for example leading to strange regexp behavior)? Matz: Any plans on including (?{}) constructs in future Ruby regexp engines? Regards, Robert