From: Andrew Johnson Date: 2007-04-06T01:33:09+09:00 Subject: Re: Capture information with a split and maybe a match? anon1m0us wrote: > > I need to get the list of users ONLY. Basically, to capture info AFTER > the dashes -----------. I did a 20.times do, but each group has a > different information. The ONLY consistent thing is the list of users > that start AFTER the dashes, Use the String#[] method with a regex to just return the portion following the dashes, and split that: result_of_na_citrix = `net group na-citrix /dom`[/-+\n(.*)/m,1].split(" ") cheers, andrew -- Posted via http://www.ruby-forum.com/.