From: James Ponder Date: 2001-04-21T22:26:54+09:00 Subject: [ruby-talk:13975] Re: regexp On Sat, Apr 21, 2001 at 07:27:46PM +0900, Roman Zippel wrote: > You could try this: > > var.scan(/^(.+)=(.+)$/) do |key, val| Ooh, I like this one the best. Being new to ruby I can't answer this myself but why couldn't the String =~ operator notice if it has a block following and do a similar thing to your example? I.e.: var =~ /^(.+)=(.+)$/ do |x,y| puts ">>#{x} >>#{y}" end This would be absolutely perfect if it could. Best wishes, James -- James Ponder; www.squish.net