One quite universal solution is
gsub("\\\\", "", str)
Thanks to the comment above.
More Related Contents:
- Remove all special characters from a string in R?
- Create new column in dataframe based on partial string matching other column
- R/regex with stringi/ICU: why is a ‘+’ considered a non-[:punct:] character?
- Select rows from data.frame ending with a specific character string in R
- R split on delimiter (split) keep the delimiter (split)
- Find the location of a character in string
- Is there an R function to escape a string for regex characters
- Remove square brackets from a string vector
- Overlapping matches in R
- Remove all characters before a period in a string
- How to measure similarity between strings?
- Extracting a string between other two strings in R
- Java how to replace 2 or more spaces with single space in string and delete leading and trailing spaces
- How to remove all whitespace from a string?
- Extract info inside all parenthesis in R
- Replace the last part of a string
- Regex group capture in R with multiple capture-groups
- Remove all text between two brackets
- Regular expression – starting and ending with a character string
- R dplyr: rename variables using string functions
- Mass string replace in python?
- Regular Expression Match to test for a valid year
- how to use a regular expression to extract json fields?
- Splitting a string on the first space
- How to search and replace with a counter-based expression in Vim?
- String.replaceAll is considerably slower than doing the job yourself
- What’s the best tool to find and replace regular expressions over multiple files?
- Remove all occurrences of \ from string
- Regular expression to remove special characters in JSTL tags
- Extracting text after last period in string [duplicate]