On Sat, Dec 3, 2011 at 2:06 PM, Wayne Brissette <wbrisett / att.net> wrote:
> Thanks. Both of these have given me more food for thought. I knew grep should have worked. The issue Ammar that I see with it though is I have to pass item via a variable and that doesn't seem to be working very well. The any? option Peter suggested does however seem to work. I'll need to see if Inotice any performance issues using it though.
>

FYI, you can use variables inside the regular expression.

>> name = "fred"
=> "fred"
>> names.grep /#{name}/i
=> ["fred,9"]

Regards,
Ammar