Mat Schaffer wrote:
> On Jul 5, 2006, at 3:39 PM, Joel VanderWerf wrote:
> 
>> irb(main):016:0> input
>> => ": cat : bat : mat :"
>> irb(main):017:0> input.scan(/: ([^:]*) /)[2]
>> => ["mat"]
>>
>> The hard part is getting the regex right.
> 
> Regex are fun and all, but why not just:
> input = ": cat : bat : mat :"
> input.split(":")[4].strip
> 
> -Mat


Yes mat that is exactly what im looking for!
In IRC the output of commands are always in the same order, I know which 
chunk i need and that would work perfectly!

-- 
Posted via http://www.ruby-forum.com/.