You need to escape your backslash by doubling it. Try this:
filename.gsub(''\\'',''/'')
---
Chris
On Nov 17, 2007 8:38 AM, Jagan
<jaganmohan.jasti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> 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 received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---