0

I want to remove the backslashes from the soap service response. Is there any way to remove the single backslashes?

string;

<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
Daniel
  • 33
  • 10
  • 2
    I don't think those slashes are really there. R just escapes quotes with slashes when printing strings in the console. Try `cat()`ing the value to see what's really there. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Feb 20 '19 at 18:37
  • Here's a possible solution: https://stackoverflow.com/questions/22755876/invalid-regular-expression-reason-trailing-backslash-error-with-gsub-in-r – MLS Feb 20 '19 at 19:14
  • Thank you I think the string completely wrong – Daniel Feb 20 '19 at 20:57

0 Answers0