Jesús Gabriel y Galán
12/18/2008 4:01:00 PM
On Thu, Dec 18, 2008 at 4:39 PM, Rick Jones <ukbell@gmail.com> wrote:
> Should have just waited a little longer... figured it out... needed to
> use the a = Regex.new(ARGV[0]) command to make it work... Thanks any way
> every one.
You can also use the regex literal, but you need to lose the double quotes.
Check this:
irb(main):001:0> a = "Test"
=> "Test"
irb(main):002:0> re = /#{a}/
=> /Test/
irb(main):003:0> re = /"#{a}"/
=> /"Test"/
Hope this helps,
Jesus.