HI all,
i want to replace slashes like this, please help me to do this,
thanks in advance.
From = .\script…\config…\gentran\test4.txt
To = ./script/…/config/…/gentran/test4.txt
HI all,
i want to replace slashes like this, please help me to do this,
thanks in advance.
From = .\script…\config…\gentran\test4.txt
To = ./script/…/config/…/gentran/test4.txt
There’s always File.join, which puts in the appropriate slashes where
necessary. Otherwise, gsub:
path_string.gsub(/\/, “/”)
Jason
Hi jason,
Thanks for your quick reply, i got the answer with ur help
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs