Ruby Newbie,Help on String.gsub()

Hello All,

May be my question is too easy ,but here is my problem.

I have a certain string which contains “” forward slash
charachter .I want to replace in my whole string the char “” with
“/” . I tried a lot but could not achieve

could any body help me in this issue

filename.gsub (/ ‘’ / , “/” )

This is the code i was using ,any help in this regard

Thanks
Jagan

You need to escape your backslash by doubling it. Try this:

filename.gsub(’\’,’/’)


Chris