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

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -