From: ThoML Date: 2008-02-09T15:25:00+09:00 Subject: Re: regex dynamic count modifier {min, max} ? > (\g|(".+")*('.+')*[^)]*) In this case you'll probably have to take care of strings like "foo \"bar\"" etc. I tend to use the regexp from my JSON-quiz solution: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/289684