From: James Edward Gray II Date: 2007-07-11T05:32:11+09:00 Subject: Re: Help: Efficient regular expression On Jul 10, 2007, at 3:25 PM, Divya Badrinath wrote: > Divya Badrinath wrote: >> string = "root 14051 14033 3 08:39 pts/2 00:00:00 /bin/bash" >> >> i need to fetch 14051 and /bin/bash from the string > > i mean i need the 2nd column and the last column. cols = string.split sec, last = cols.values_at(1, -1) Hope that helps. James Edward Gray II