P
Patrick Gundlach
Dear Ruby-hackers,
simple problem: replace a certain letter with \' (backslash apostrophe).
------------------------------
#!/usr/bin/ruby -w
puts "hello".gsub!(/h/,"\\'")
------------------------------
result: elloello
I would like to get:
\'ello
What should I try?
Patrick
simple problem: replace a certain letter with \' (backslash apostrophe).
------------------------------
#!/usr/bin/ruby -w
puts "hello".gsub!(/h/,"\\'")
------------------------------
result: elloello
I would like to get:
\'ello
What should I try?
Patrick