From: michael xu Date: 2011-08-26T04:21:06+09:00 Subject: Re: how to find all matches using ruby regex? Yes, it works fine. Thank you Nik! Nik Z. wrote in post #1018346: > You never set the 2nd set of parens (...) in the original regex: > (data-\d+\.\d+\.\d+\.tar\.gz)/ > > therefore, no $2 for you... > > change to regex to /(data\S+) and (data\S+)/, and you get $1 and $2... > -- Posted via http://www.ruby-forum.com/.