如何为“\”替换“\\”

时间:2018-01-04 14:50:42

标签: r gsub

我有这样的事情:

"jo\\xe3o madeira"

我想要这个:

"jo\xe3o madeira"

如何将\\替换为单个\ 我尝试过这样的东西:

gsub("\\\\", "\\", "jo\\xe3o madeira")

输出结果为:

"joxe3o madeira"

所以它完全删除了“\”

提前致谢

1 个答案:

答案 0 :(得分:2)

你可以使用: -

`<services>
  <service  name="MyService.Service1" behaviorConfiguration="Service1" >

</services>
 `

 where MyService is the application name , Service1 is the default implementation class for IService1
 `
 <protocolMapping>
  //Remove any http or https bindings provided  
</protocolMapping>   
 `
It should help when you use WCF Application Project

这会给你: -

str <- "jo\\xe3o madeira"
    cat(str)