From: dblack@... Date: 2006-12-21T10:34:41+09:00 Subject: Re: Searching Stings with Arrays? Hi -- On Thu, 21 Dec 2006, William James wrote: >> array.find{|s| @string[/\b#{s}\b/] } > > We don't need no stinkin' loops: > > p @string.split(/\W/) & array To each his own :-) I like the loop -- though I'm not sure why I used [] instead of just matching. I think I somehow had map on the brain. David -- Q. What's a good holiday present for the serious Rails developer? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) aka The Ruby book for Rails developers! Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)