From: Mark Probert Date: 2003-08-12T04:59:41+09:00 Subject: Re: ruby 1.8.0 and =~ "Hal E. Fulton" did say ... >> >> Can someone please tell me the easy way to redo the following? >> >> arr.each { |item| >> if item =~ /blah/ >> info = item.split(/:/) >> @store[key] = "#{val}:#{info[1].strip}:" >> end >> } > > No need to redo that one... the item on the > right of =~ is a regex, not a string. > Doh! -laugh- I tried to use String.scan (it takes a regex) and happened to stumble over the answer. Thanks for the help! -- -mark. ---------------------------------------------------- Mark Probert probertm@NOSPAM_nortelnetworks.com Nortel Networks ph. (613) 768-1082 ---------------------------------------------------- All opinions expressed are my own and do not reflect in any way those of Nortel Networks.