From: Martin DeMello Date: 2007-12-07T04:24:00+09:00 Subject: Re: if /hello/ =~line On Dec 6, 2007 5:17 AM, Lee Jarvis wrote: > > True, you could use the Regexp class also then.. > > var = 'hello' > revar = Regexp.new(var) # And don't miss the very useful Regexp.quote, which makes sure everything in var is matched literally revar = Regexp.new(Regexp.quote(var)) martin