On Dec 3, 2011, at 6:23 AM, Ammar Ali wrote:

> 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 I notice any performance issues using it though.
>> 
> 
> FYI, you can use variables inside the regular expression.
> 
>>> name = "fred"
> => "fred"
>>> names.grep /#{name}/i
> => ["fred,9"]

AH! Thanks! I was using it incorrectly. That will teach me to code before I have two cups of coffee. :) 

Wayne