From: Tim Hunter Date: 2008-09-27T21:54:15+09:00 Subject: Re: Trying to use gsub using variables jackster the jackle wrote: > thanks guys...I'm making progress but what I have been slowly leading up > to is searching using a variable then replacing it with a variable. > > acl = "now is the time" > x = time > y = TEST > > acl.gsub(/x/,y) > > How do I get gsub to use the value of x rather "x" itself in my match? > > thanks > > Jackster /#{x}/ -- RMagick: http://rmagick.rubyforge.org/