j3n7il jones wrote:
> Is thier also a way to go to the next occurence?
> 
> Like
> 
> input = : cat : bat : mat :
> 
> 
> param = getparam(input,':', 3)
> 
> then param would equal "mat"
> 
> 
> See what I Mean?
> 

Lots of ways to do this. One way:

irb(main):016:0> input
=> ": cat : bat : mat :"
irb(main):017:0> input.scan(/: ([^:]*) /)[2]
=> ["mat"]

The hard part is getting the regex right.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407