From: "Sandor Szücs" Date: 2008-08-06T18:47:53+09:00 Subject: Re: break if status =~ /variable/ wildcard possible in Ruby? On 05.08.2008, at 15:54, Mmcolli00 Mom wrote: > Can you use a wild card with a variable? I have StrgErrFieldName as a > variable that will hold a number of possible status ids. I want to > search on what is in the variable. However =~ only works with > strings so > I have tried putting the variable in inside the '/'. Use #{var}. irb> s="abcdef"; irb> m="b"; irb> s =~ /#{m}/ => 1 regards, Sandor Szücs --