J
Jack Smith
I have simplified my method for searching test to the following:
def replacer(a, b)
x = "now is the time for all good men to come to the aid of their
country"
x.gsub(/#{a}/, b)
puts x
end
puts "enter what to replace: "
j = gets
puts "enter replacer word: "
h = gets
replacer(j, h)
Can someone help me determine why gsub can't match my "a" value?
thanks
def replacer(a, b)
x = "now is the time for all good men to come to the aid of their
country"
x.gsub(/#{a}/, b)
puts x
end
puts "enter what to replace: "
j = gets
puts "enter replacer word: "
h = gets
replacer(j, h)
Can someone help me determine why gsub can't match my "a" value?
thanks