From: Mateusz Tybura Date: 2008-04-02T23:04:47+09:00 Subject: Re: Regexp Capture Access ------=_Part_1370_15849210.1207145081584 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Try: %r{(\w,)+}.match('a,b,c').to_s[0..1] #=> "a," 2008/4/2, Oliver Saunders : > > Given that: > > %r{(\w,)+}.match('a,b,c')[0] #=> "a,b," > > and > > %r{(\w,)+}.match('a,b,c')[1] #=> "b," > > How do I access the capture that contains "a,"? > > -- > Posted via http://www.ruby-forum.com/. > > -- My own blog (in polish) : wujciol.yoyo.pl ------=_Part_1370_15849210.1207145081584--