From: Robert Feldt Date: 2001-06-14T18:00:12+09:00 Subject: [ruby-talk:16464] Re: Opinion sought: parsing non-regular languages On Thu, 14 Jun 2001, ts wrote: > >>>>> "R" == Robert Feldt 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 pragma has been used (see L), or the > variables contain results of C operator (see > L). > ------------------------------------------------------------ > 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