ruby - Problems with replacing into string -
ruby - Problems with replacing into string -
i'm trying execute code this:
template = " ... here html tags [sitename] ... here html tags " template = template.gsub(/\[sitename\]/,"http://google.com") but it's not working. mistake?
can describe how it's not working?
in ruby 1.9.2 expected, command
puts template gives
... here html tags http://google.com ... here html tags ruby gsub
Comments
Post a Comment