From: Heesob Park Date: 2008-08-05T23:37:57+09:00 Subject: Re: break if status =~ /variable/ wildcard possible in Ruby? 2008/8/5 Mmcolli00 Mom : > 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 '/'. Ruby doesn't like > it. What do you suggest I do? Please help me out. Thanks. Mom mmcolli00 > > while true > status = ie.status() > break if status =~//+StrgErrFieldName+// Try this: break if status =~/#{StrgErrFieldName}/ > ie.send_keys("{TAB}") > end > > Regards, Park Heesob