Problems with replacing into string
I'm trying to execute code like this:
template = "
... here html tags
[sitename]
... here html tags
"
template = template.gsub(/\[sitename\]/,"http://google.com")
But it's not working. What is my mista开发者_高级运维ke?
Can you describe how it's not working?
In ruby 1.9.2 I get what I expected, the command
puts template
gives
... here html tags
http://google.com
... here html tags
精彩评论