From: Jason Sweat Date: 2004-11-05T23:04:50+09:00 Subject: Re: recursive brace matching with Ruby regexp On Fri, 5 Nov 2004 14:05:00 +0900, Mark Hubbart wrote: > > > Are you saying Oniguruma *will* support it, or *does* support it? It > > > would be nice if it already does :D > > > > Sure does. > > Indeed it does! I just tried it out. And named subexpressions work too > :) many new features since I last checked it out: > > http://www.geocities.jp/kosako1/oniguruma/doc/RE.txt > > Thanks for pointing it out. Great!! Just comiled ruby from cvs (ruby 1.9.0 (2004-11-04) [i686-linux]) and was able to match using: dat = <<-"END_TEXT" /* some stuff */ class foo { public $var; public function __construct() {} public function bar() { if (false) { } } } // some other stuff END_TEXT dat.match(/(class\s+\w+\s*(\{(?:[^\{\}]*|\g<2>)*\}))/) print $1 Thank you very much for your help!! Regards, Jason -- http://blog.casey-sweat.us/